asp.net gridview edit button click error
I have this exception i have a asp.net gridview with select edit and del开发者_如何转开发ete button when i click edit or delete i have this bug. the gridview is inside a update pane
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The GridView 'combinationViewGridView' fired event RowEditing which wasn't handled.
any ideas
Even if the code to handle the update isn't in the rowEditing event, the event must be handled at the page level. You will need to add the event in your code behind and then just return false or exit sub (for vb) to allow the update panel to proceed with its mojo.
You haven't handled the rowEditing event in your code behind, which is required. Handle the event.
On your ASPX page
<asp:GridView id="myGV" OnRowEditing="myGV_RowEditing" OnRowDeleting="myGV_RowDeleting" ...
On your code behind
protected void myGV_RowEditing(object sender, GridViewEditEventArgs e) {}
protected void myGV_RowDeleting(object sender, GridViewDeleteEventArgs e) {}
Do you actually edit the row on the codebehind? If you are not just use commandName="Select"
精彩评论