Using rowupdating event

We use the Row Updating event of Grid View to update the record in the database table.We get the Id value using the row index and another Text Box value is also retrieved.When a Grid View row is in edit mode then we can update the row's record in the relational database table.So we need to create a Stored Procedure on which we pass all parameters that are updateable along with the primary key value, in other words the row data's key value that is being updated.In the above code, I set two properties Show Edit Button and Show Cancel Button of Command Field.These properties will automatically render Edit, Update and Cancel buttons inside Grid View column.Delete a Record We can delete a record from the database table by clicking on the delete button that is in the Delete column of the Grid View.

The Grid View control is a tabular databound control but sometimes it is used like a spreadsheet control. NET 2.0 and is an improved version of the Data Grid control. We can use this to display data from a database and edit, sort and select the data.Create SQL Connection We need a connection with a Microsoft SQL Server database so we can access data and perform an operation on it.We define a connection in the web.config file and give a name to the connection string.aspdotnet-suresh offers C#articles and tutorials,csharp dot net,articles and tutorials, VB. the good old problem of getting the data from the row that is being currently edited within a Grid View. Accessing the "Controls": This method gets you access to the control in the Grid View, which might be useful based on what you are doing.