Updating in gridview asian montreal girls dating

After successfully deleting records, again I am calling Bind Data() method to rebind the Grid View.Hope this article helps to begin working with Grid View control. Right now I have a label turn to visible true and a message when someone either edits or deletes something successfully.As there is no row at -1 position so Grid View will be shown in normal mode.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.

When Edit link of the Grid View will be clicked then On Row Editing event will fire that will call Edit Record method.When Delete link of the Grid View will be clicked, it will confirm the user whether they really want to Delete the record, if they will click OK, it will fire On Row Deleting event of the Grid View that will call Delete Record method.In this method again, I am getting the primary key value using Data Keys property of the Grid View and using it to delete the records from the database.To populate the Grid View, I am calling Bind Data() method from Page_Load event after checking Is Post Back property of the page, so the Grid View will only be populated when there is no postback on the page (when the page loads for the first time).This will make sure that Bind Data() method will not fire when you are going to edit, update or delete the record.In practical scenario you should use your existing architecture to populate and update the data.

937

Leave a Reply