The Gridview works as expected and when I make use of the events also, IE the editable fields update nicely.
If the user clicks and edits, then clicks the update link, the database is updated and the page reloads.
Save all or press "Ctrl S" and hit "F5" to run the page, the page will look as in the following image: Click on "Edit the Grid View", it will display Textboxes in each cell as in the following image: Edit the value(s) here and click on the Update link, it will update all the data or to remove it click on the "Delete" link above the image shown.
One note will be helpful for you, while describing Columns in Grid View if you are using a boundfield then create objects of the control using cells[index] in the rowupdateing event of Grid View, but if you are using controls itself like Label or textboxes etc then use Fincontrol("stringid").
The visitors to a web site can typically be divided into two groups: the users and the administrators.
In data driven web sites, users are normally allowed to view data and administrators are allowed to add, edit or delete data.
Unless I've misunderstood; your dilemma is nothing to do with gridviews etc, and is all to do with merely maintaining page scroll position on post-back...
have a read of this Java Script solution from the 4 guys P.
Following code will show you how you can get Row Index, Product ID and Command Name of the button when user click any button in the Grid View.
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.
To bind the Child Grid to Child Data Source we have to use Row Data Bound event which is called every time when each row from database is bind to the Grid View's row.
But this functionality is some what different in Grid View Control. I mean to say that in Grid View Control if you have added one template column having Grid View inside it and now if you select "Column Sorting" command then it will not call any event of Master grid.
It will directly call the sorting handler of the child grid.