Using a Button in a DataGrid after postback

Discussion in 'ASP .Net Web Controls' started by Eric@PWS, Mar 24, 2005.

  1. Eric@PWS

    Eric@PWS Guest

    I have a User Control that does the following: on first display, there is a
    set of controls that collect search criteria. On PostBack, the controls are
    shown with their settings (thanks to ViewState) and a DataGrid appears with
    the results of the search. I then want to link to other pages from each of
    the rows using buttoncolumns of the DataGrid.

    Note that I need to load the DataGrid if it IS a PostBack.

    Anyway, the whole thing works fine if the links are LinkButtons and I use
    the ItemCommand event to extract the command. It doesn't work if the links
    are PushButtons. I understand why it doesn't work. I'd like to know if there
    is a workaround that anyone has used. The UI design uses PushButtons in all
    of the datagrids. This is the only one that can't use PushButtons, so it's
    inconsistent.

    Thank you in advance for your help.
    Eric

    --
    Eric Valinsky
    Principal Consultant
    Plainwrap Solutions
    Eric@PWS, Mar 24, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Connell
    Replies:
    1
    Views:
    546
    Michael Evanchik
    Nov 10, 2003
  2. Chris Lane
    Replies:
    4
    Views:
    11,214
    Chris Lane
    Nov 17, 2003
  3. Andreas Klemt
    Replies:
    0
    Views:
    827
    Andreas Klemt
    Feb 1, 2004
  4. gce
    Replies:
    2
    Views:
    1,704
  5. Andrew Connell

    DataGrid contains no data after postback of edit button click...

    Andrew Connell, Nov 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    185
    Andrew Connell
    Nov 6, 2003
Loading...

Share This Page