The visitors to a web site can typically be divided into two groups: the users and the administrators.
Next event is the Grid View Row Editing event to give ASP. You need to set the Edit Index property of the Grid View with the New Edit Index property of the Grid View Edit Event Args class.If user clicks the Cancel button while Grid View is in editing mode, you need to Cancel the Editing process and also need to reset the Edit Index property to -1 in the Row Canceling Edit event of the Grid View control as shown below: The last step is to handle the Row Updating event to actually update the back end database.By Default, Grid View control displays Item Template which directly shows the Product Name and Unit Price columns but when user clicks Edit button Grid View automatically switches to Edit Item Template and display the control available inside Edit Item Template for user editing.Now I will show you the C# code behind file of the above ASP.In this tutorial we are searching for our Text Box controls txt Product Name and txt Unit Price.
To get the Primary Key reference we can use the Data Keys collection of the Grid View. before that i want just using Find control and casting and then retrieving all lot code. If values are same they could notify user to change the value(give new cell value). Every one can use it to compare the new value with old ones.This enables you to provide an event-handling method that performs a custom routine, such as checking the results of the update operation, whenever this event occurs.A Grid View Updated Event Args object is passed to the event-handling method, which enables you to determine the number of rows affected and any exceptions that might have occurred. This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.