Rowupdating command gridview

Net1.1 's Datagrid call the Item Command of Mastergrid.

And it will not call the Row Data Bound of Master Grid so your child edit grid for that particular row will not bind to datasource. Now, here you in Row Command of child grid you have to rebind the grid with the datasource.

Net Grid View control with simple Data Set or Data Table, and also explains the methods like Insert, Edit, Update and Delete function in the Grid Viewcontrol.to bind a Grid View control to the database with some Data Source controls such as SQLData Source, Object Data Source, Access Data Source and even XMLDatasource.

In the template field I will Place a label or some controls, So that it’s very easy to access those controls in the code behind by using Find Control method. Item Template is the content to display for the items in the Template Field.

This example shows how to edit and update records in a Grid View in ASP. This example is helpful in situations where an administrator needs to edit several records from the database.

For demonstration I have created a database (named Database.mdf) in which we have a table named tbl_Employee.

It is up to the user to take advantage of this feature. Here I have one Master Table which is bind to the Master Grid using Master Data Souce and one Child Table which is bind to Gridview inside template column of Mastergird.

rowupdating command gridview-59

But here it will not call the Row Command event of Master Grid it will directly call Row Command event of Child Grid. Now it will call Row Data Bound of Mastergrid here you will find the whether the Row State of particular Row is edit then you will find Child Grid with Edit and Delete Command in the Edit Tempalate of Template Column. When you press Edit Command of Child Grid it will Row Command of Child Grid unlike ASP.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.This article is very useful to all the users who are working with ASP. Here I am explaining how to work with Grid View control in ASP.Net 2.0 which is very easier then Data Grid Control in ASP. I will also explain what are the differences in Grid View and Datagrid Control in ASP. I want to explain how to work with template column having datagrid inside. Net 2.0 Grid View control is too good, easy and very user friendly.

Leave a Reply