Rowupdating oldvalues newvalues
Above code will be used when user hits on Master Grid Edit button.So In the Template Column child grid with edit and delete option will get visible.Here, we set the Data Source of the Grid View to Sql Data Source1. We also enable paging, sorting and editing features of the Grid View.By default when the Grid View controls goes in edit mode, it displays Text Boxes for entering values. NET 2.0 Grid View control allows us to quickly edit and delete records. Drag and drop an SQL Data Source control on the web form.
The asker of the question wanted to get the database field name by index.But the childgrid will not be bind to any data source if you don't bind it to in Row Command event. When you press Update Command it will call Row Command with Command Argument as "Update". And after it will call the Row Updating event of the Child Grid. On the next step select Customer ID, Company Name, Contact Name and Country columns (Figure 2).