How to show messagebox in onrowupdating dating and relationship guide for women
To get the Primary key, I have used Data Keys property of the Grid View with the index of the row, being edited and stored into a integer variable after parsing.Now I have declared a Grid View Row variable named row and stored the current row being edited into it.Connect me on | https://twitter.com/sheonarayan | Hello....
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 Edit link of the Grid View will be clicked then On Row Editing event will fire that will call Edit Record method.
In this method, I am specifying the Edit Index property of the Grid View to the New Edit Index of the Grid View and then calling Bind Data() method again to bind the data.
Till now our Grid View is ready to be populated, now let’s write a method to populate the Grid View.
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).
In this method, I am specifying the Edit Index property of the Grid View to -1.