Home > ASP .Net > ASP .Net Datagrid Itemcommand Event is not fired

ASP .Net Datagrid Itemcommand Event is not fired

March 21st, 2006 Leave a comment Go to comments

Check it out for event handler. It is quite possible that if you cut and paste the datagrid from one place to another, it will loose all the event handlers which were previously defined.
If you think that event handler is defined correctly, check out how the datasource is bound to the datagrid. Your code should bind the datasource when there is no postback.

If not Page.IsPostback Then	BindGrid()End If

Otherwise on each postback, the datagrid will be bound to the datasource resulting in ItemCommand Event not fired.

Categories: ASP .Net Tags:
  1. Sorna Kumar
    July 11th, 2006 at 12:44 | #1

    It is very useful tip.I had done the second mistake.afer verifying it i have cleared the error

  2. August 21st, 2009 at 09:29 | #2

    Humm… interesting

    Anyway, thanks for the post

  1. No trackbacks yet.