Some other Grid Views reserved key words and their default associated events are as follow : “Cancel” – Raises the Row Canceling Edit event.
In the event handler function I have checked for the Command Name property and write necessary code for each of the actions.
The HTML code for the Grid View is as follow : Till now everything looks fine but the problem arises when you run this application.
Suppose if we are trying to hide primary key of our table, there is actually no need to hide. In the above Snippet you are seeing a label in Item Template that means whenever we are showing Grid View to the user Label will be visible to the user.
We will use Template Field, whenever we want to define some custom control in the data bound controls like Grid View, Data Grid or Data Repeater.