zintech
asked on
ASP.NET gridview onrowediting
I have a GridView that I fill with a SQL statement when a Button is clicked that works fine. My question is, I have an Edit button on each row of the GridView, and I don't know what code to write to have the user be able to edit each individual row when the GridView1_OnRowEditing() event fires. I haven't been able to find an example of how I would do this.
ASKER
One thing I must note is that I am only showing the Edit option on the Gridview for certain users. so I am limiting user access to Edit/Update and I use the GridView1.AutoGenerateEdit Button = true statement for those users. Does this change how I would go about Editing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Generally, adding a command field for edit,update,cancel will enable the user to select which row to place in edit mode. Only if you need to do some special processing would you need to code the OnRowEditing event (hence the lack of examples). BoundFields, CheckBoxFields, and template fields(edit templates) allow data input.