Updating in gridview

There are three ways for the row to enter edit mode.The first one is when the user presses F2 (or double clicks the cell), the second is when the Begin Edit() method of the Rad Grid View is called and the third is when the user starts typing over the cell.Future installments will explore more advanced updating scenarios, such as customizing the Grid View's editing interface and programmatically setting the updated values. The UPDATE Table Name SET Column Name1 = @Parameter Value1 Column Name2 = @Parameter Value2 ...

updating in gridview-83

To be sure that the appropriate data will be submitted (as this handler will be used by the add operations too), you have to assure that the action is Commit and the operation type is Edit. Edit Operation Type = Grid View Edit Operation Type.

Private Sub rad Grid View_Row Edit Ended(By Val sender As Object, By Val e As Grid View Row Edit Ended Event Args) If e. Edit Then 'Edit the entry in the data base based on your logic.

In this case the Row Edit Ended event will be raised again.

Via the Grid View Row Edit Ended Event Args class you can access the Edit Action (Commit or Cancel) and the Grid View Edit Operation Type (Insert or Edit) .

NET 2.0 introduced a number of new Web controls designed for accessing and modifying data. NET 2.0's data source controls make it possible to retrieve, insert, update, and delete data without having to write the tedious dedata access code that was so commonplace in ASP. Previous installments of this article series have looked at returning, inserting, and deleting data using the Sql Data Source control. These controls can work in unison with the data source controls to facilitate inserting, updating, and deleting data.

These controls allow page developers to declaratively access and modify data without writing any code to perform the data access. In this article we will examine basics of using the Sql Data Source and Grid View controls to update records from a database.

A Sql Data Source control was added whose Insert Parameters referred to these controls.

The Web Form also included a Button whose method, thereby kicking off the inserting workflow.

Likewise, the parameter values in the Astute readers will notice the similarity between the Access Data Source and Sql Data Source controls' inserting, deleting, and updating workflows.

Tags: , ,