Reputation: 10364
I have One GridView in which I added one LinkButton in the TemplateField and Specified its Text as "Delete" and its purpose is to delete the Row. I have written all the Coding part to delete the Row in the GridView RowCommand Event. I clicked the GridView RowDeleting Event but I didn't write any code in that event and finally I removed that event both in the .cs file and also in the SourceCode.
But still when I delete the row, one error throws such as
"The GridView 'gvToStock' fired event RowDeleting which wasn't handled."
and deleting function is not working.
But At the same time, If I included the RowDeleting Event in the .cs and source code file, its working fine.
What would be the reason for that?
Upvotes: 2
Views: 5198
Reputation: 10364
Yes. As MartinHN Said, The Command Name specified in the LinkButton caused the Problem. The following link describes some detailed explanation about this:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowcommand.aspx
Upvotes: 3