After it has been clicked the postback places that row in edit mode. At this point in time the above Edit Item Template is displayed with two Image Buttons within it.One has it's Command Name = "Update" and the other "Cancel".My problem lies in that the click on the Update Image Button posts back, but neither the Row Command nor Row Updating events get triggered.I have set the requisite attributes in the Grid View tag. I removed the master page and let the page that contained the Grid View inherit from Page, and it worked. Selected Then 'Here you will get all Check Box List Selected Items 'You can do any operation as you like 'For simplicity just printed the value Response. Edit Index = -1 Bind_Check Box List() End Sub Protected Sub Grid View1_Row Canceling Edit(sender As Object, e As System. Here is the script to create “Subject Details” table: Note: To avoid SQL Injections and security purpose, I used parameterized query in my following example code.
Yes, I did put the breakpoint at the Row Updating line (and not in the function).
Edit Index = -1 Bind_Check Box List() End Sub Note: Grid View1.
Hope now you can control Check Box Lixt within Grid View in Edit Mode.
In my previous tutorials, I’d explained about how to bind data to gridview, how to get connection string, insert update delete gridview data using parameterized query, difference between executereader executenonquery and executescalar and other more cracking tutorials on Grid View, Asp.net, SQL Server here.
Now here in this tutorial, I’ll explain how to show data in gridview and then perform CRUD operations on gridview data.