Gridview edit row updating direct dating summit dvd 2
In this method, I am specifying the Edit Index property of the Grid View to -1.
As there is no row at -1 position so Grid View will be shown in normal mode.
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.
If you have a feedback or suggestion, please do write to me. Full Name: Sheo Narayan Member Level: Honorary Platinum Member Status: Administrator Member Since: 7/8/2008 PMCountry: India Regards, Sheo Narayan MVP, Author, Writer, Mentor & architecting applications since year 2001. What would you do if you wanted to have an event trigger when you click on the "cancel" button during the delete process. When a person starts to delete another item and decides to cancel the delete, the old message from the previously edited or deleted item still shows. ya,its how can I use the button field for the edit and delete in the template field.suppose i used that controls,what kind of events could I used for edit successfully?
You can notice that I have kept Required Field Validator too inside the Edit Item Template as I want the textbox to be validated for empty data.
That’s why I have placed different templates like Item Template (for normal view) and Edit Item Template (for edit view).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.After successfully deleting records, again I am calling Bind Data() method to rebind the Grid View.Please note that when you will not bind the data again, Grid View will not change in edit mode.When Cancel link is clicked on Grid View in edit mode, On Row Canceling Edit event will fire that will call Cancel Record method.