OnItemCommand and Paging in DataGrid

Discussion in 'ASP .Net Web Controls' started by Sink, Nov 28, 2003.

  1. Sink

    Sink Guest

    I just changed a hyperlink column to a button column,
    added an OnItemCommand so that I could better control
    my screen stack. Lo and behold, it worked fine except my
    paging no longer works. It appears that OnItemControl is
    being called before paging event and all is lost.
    Anyone have any experiences with this?
    Sink, Nov 28, 2003
    #1
    1. Advertising

  2. Sink

    Sink Guest

    Found a fix

    In the OnItemCommand handler, I added the following
    at the beginning of the routine:

    if(e.Item.ItemType == ListItemType.Pager)
    return;

    The paging handler them is called and all is well.

    >-----Original Message-----
    >I just changed a hyperlink column to a button column,
    >added an OnItemCommand so that I could better control
    >my screen stack. Lo and behold, it worked fine except my
    >paging no longer works. It appears that OnItemControl is
    >being called before paging event and all is lost.
    >Anyone have any experiences with this?
    >.
    >
    Sink, Nov 28, 2003
    #2
    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. Rick White
    Replies:
    1
    Views:
    1,589
    Natty Gur
    Jan 13, 2004
  2. LeAnne
    Replies:
    0
    Views:
    1,091
    LeAnne
    May 14, 2006
  3. Steve Hershoff
    Replies:
    0
    Views:
    394
    Steve Hershoff
    Aug 9, 2006
  4. Sonal

    datagrid onitemcommand not firing

    Sonal, Oct 29, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    164
    Sushila [MVP]
    Oct 30, 2004
  5. Steve Hershoff

    DataGrid paging-- OnItemCommand not respecting page number?

    Steve Hershoff, Aug 9, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    195
    Steve Hershoff
    Aug 9, 2006
Loading...

Share This Page