Gridview updating event in asp net adult singles dating memphis nebraska
Currently i have the items in the grid getting inserted/deleted/updated in the "oninsertcommand/ondeletecommand/onupdatecommand" events.
However, I want to do these grid changes only when the submit button is clicked.
For Page Name and Page Description field I want them to appear in the Text Box in edit view, so I have specified text property of Text Box as the field value in Edit Item Template and for Active field, I want it to appear as the Drop Down List so I have specified the Selected Value property as the value of the Active field.
You may notice that the last column of the Grid View is a Delete column that let user delete the record from database, so I have placed Delete link button inside the tag and have specified on Click property as Java Script confirm return value, so that when user clicks on it he/she sees a confirmation box whether he/she really wants to delete the record.
When Update link of the Grid View will be clicked (in edit mode), On Row Updating event will fire that will call Update Record method.
In this method, we have to get changed values of Text Box and Drop Down list and also we need the primary key value for the record that is being edited.
When Cancel link is clicked on Grid View in edit mode, On Row Canceling Edit event will fire that will call Cancel Record method.
In this method, I am specifying the Edit Index property of the Grid View to -1.