Sunday, September 24, 2006

Trick : Event RowEditing which wasn't handled ??!! Solution

Dear folks,
if you have a gridview in asp.net 2.0 page and u tried to bind it again after searching or any other action,u will get this error :

event RowEditing which wasn't handled ??!!

simply,one of the problem will cause this,that you have commands in your grid with the default name and you handle it on row command event handler.

by default,asp.net after bind the grid it generate the default event handlers like (Edit,Update,Delete).

Solution : just change default command name to anohter name,this problem will disappear.

Command name : Edit -->Change it to : EditCustomers

Hope this helps........ Enjoy with .net

Regards,
Moustafa arafa

5 comments:

Unknown said...

This helps, thanks for the trick :)

Unknown said...

"that you have commands in your grid with the default name and you handle it on row command event handler."

What does this mean?

"Solution : just change default command name to anohter name,this problem will disappear."

The command name of what? The event Handler? Code examples would be nice

Unknown said...

Dear Micheal,

I mean by Command name is the command name of the gridview.

change your command name from the default value for exmaple "Edit" to "EditCustomer".

let me know if you need any help.

Unknown said...

Thanks for the insight. This fixed one problem, but I'm still a bit stuck. I created a gridview inside of a gridview (trying to create a simple 1-many editing screen). Parent editing works fine. But the only way to change the Edit command name to something else was to convert it to a template. That removed the error, but now the editing functionality doesn't work. Click on 'Edit,' nothing happens.

Unknown said...

You can to handle them manually from Row Command Event handler.

Let me know if you need any other help.