GridView RowCommand event not firing

I just had a colleague who encountered the same problem; his was caused by the onrowcommand= attribute not being set in the asp:GridView element. This should be set to the name of the handler which will be handling the event.

... just in case someone has the same issue!


You must not bind your grid on postbacks in Page_Load, only when something changed that causes the Grid to reload data(f.e. Sorting,Paging) and only in the appropriate event-handlers.

Another possible reason: Have you disabled ViewState somewhere?


Use CausesValidation="false" in button tag. It can solve the problem.