2010-10-07

OnRowCommand does not fire in ASP.Net gridview

All of a sudden all the command buttons stopped working in a gridview in my project. The OnRowCommand event did not fire.
Turns out last week I set the EnableViewState property of the grid to false. Never disable the ViewState of a gridview!

Short:
If all of a sudden the OnRowCommand stops firing in your ASP.Net GridView make sure that the EnableViewState property of the grid is set to true.

No comments: