Gridview rowediting and rowupdating

Posted by / 02-Nov-2016 23:55

Connection string must be based on your database details. Drag the gridview control from tool box and placed into the page and make it Autogeneratecolumns as false, so manually we will create the gridview columns to display.Copy the below code and paste into aspx page as shown below.“Select” – Raises the Selected Index Changing and Selected Index Changed events. “Update” – Raises the Row Updating and Row Updated events. I need to do the Select and Edit in the code behind because I have to change schema prefix in the sql statement depending on the current user.And here I’m explaining some basic functions of this gridview control such as insert edit and delete a record.

“Delete” – Raises the Row Deleting and Row Deleted events. “Page” – Raises the Page Index Changing and Page Index Changed events.

In general, gridview control is used to populate the data in tabular format from different datasources and basically it derived from webcontrol class.

Actually gridview control is built with lot of features and this control is commonly used for all applications.

In this article, we will explore how to add, update, delete and select a record from sql server database using gridview control in a simple way.

I’m using visual studio 2008 and sql server 2008 for this sample.

gridview rowediting and rowupdating-89gridview rowediting and rowupdating-50gridview rowediting and rowupdating-32

I came across a very interesting error while using buttons/link buttons in the Grid View for editing the Grid View rows data.

One thought on “gridview rowediting and rowupdating”

  1. I actually had two men that I had spoken to by e-mail once or twice, then the first time I spoke to them on the phone they both you want to come to my house? Why on earth would I go to some strange man's house after 2 e-mails and a half a phone conversation!?!?! However, if you do decide to keep using these sites, just be cautious.