Datagrid rowupdating event

NET 2.0, Microsoft has introduced Grid View control which too displays tabular data in a grid.With Grid View control, you can display, edit, and delete data directly from different kinds of data sources with out writing any single piece of code Grid View control automates paging, sorting and database operations like updating, deletion and selection of data with out writing single piece of code.aspdotnet-suresh offers C#articles and tutorials,csharp dot net,articles and tutorials, VB.Free counters Added on January 19,2012 Follow Me @vmsdurano A bit About Me Disclaimer The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers.This is possible with new property Data Source ID which allows performing paging, sorting and all database operations directly with the Data Source.For example, Grid View can directly update, delete and perform paging, sorting with a sqldatasource with out any custom code.On contrary, Data Grid can declaratively bind a Data Source control but it can do it for only displaying data.All other database operations have to be coded manually.

datagrid rowupdating event-1datagrid rowupdating event-44datagrid rowupdating event-56datagrid rowupdating event-66

You can see properties of Grid View1 in below listing Another striking difference between Data Grid and Grid View is in the event model.

Later, column information is used to generate UPDATE, DELETE or INSERT statements.

The target-row for an UPDATE or a DELETE statement is identified by The WHERE clause.

The above XAML code defines a Data Grid with various columns bound to the ‘Employee’ class properties.

Notice that the Data Grid also defines the ‘Data Grid Check Box Column’.