Updating datagrid asp net
You can see the C# code below will give the row number whatever you are editing by New Edit Index property.
So Grid View will put the appropriate row into the Edit Mode by assigning row number to its Edit Index property. You can follow any responses to this entry through the RSS 2.0 feed.
If he clicks edit (or) in the edit mode he can be able to see the Textbox.
Then again we have to call that Bind Grid Data () method to bind data for the textboxes. You can leave a response, or trackback from your own site.
If we use proper command names for the buttons like “EDIT”, “DELETE”, “UPDATE”, “CANCEL” these will also trigger the appropriate Grid View Events.
Ok let’s move on to Code behind what we have to do when user clicks Edit, Delete, Update and Cancel When we click on Edit the On Row Editing event will be fired.
The above piece of code will also do the same as label in Item Template and Textbox in the Edit Item Template.By default all the boundfields will be trasferred as Textboxes in Edit Mode.