tags:

views:

201

answers:

4

I have this exception i have a asp.net gridview with select edit and delete 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

+1  A: 

You haven't handled the rowEditing event in your code behind, which is required. Handle the event.

Paddy
I have handle the event
Haroldis
@harold-sota - not according to that exception. Can you post some code snippets?
Paddy
@harold-sota - in addition, I often find that it is a bit simpler to code your page, get it working and then drop an update panel around your controls.
Paddy
+1  A: 

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.

Joel Etherton
A: 

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) {}

Kant
A: 

Do you actually edit the row on the codebehind? If you are not just use commandName="Select"

rlee923