views:

91

answers:

1

Can I change "on row command" event handler of a gridview dynamically from code and in run time? I use C#

Thanks

+1  A: 

Just add your handlers somewhere in your code where you want changed (perhaps in a click event handler). If necessary, remove your old handler beforehand.

gridView.RowCommand -= MyOldRowCommandHandler;
gridView.RowCommand += MyNewRowCommandHandler;
Jeff M