Updating sql using gridview control
In a previous post we saw how easy is to bind data to a Grid View control, without using a build in Data Sources.
In this post we will use an Sql Data Source control which will retrieve some data from a database and will bind them to the Grid View control.
private void Bind Data() And here is the HTML view of the Grid View control.There should be some way to only update the changed row.In this post I am going to discuss a simple technique that solves this problem.Data Item Index returns the rowid for the entire datasource, not for the page. Regardless, thanks for sharing your code here and at Grid View Guy.If you are using paging, the index needs to be between 0 and the Page Size.
Search for updating sql using gridview control:
protected void Update(object sender, Event Args e) The update method simply looks into the Row Index list and finds the changed rows from that list.