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:

updating sql using gridview control-65

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating sql using gridview control”

  1. Finally, we ask that you treat other users and all moderators with respect – it’s not asking much, we would like everyone to enjoy our chat room , as an individual you can help achieve that by simply following the guidelines. Terms & conditions | Privacy statement | Cookies Policy | Contact us | Be Safe 1999 - 2015 Rights Reserved.