DataGrid OnPageIndexChanged does not fire for first page link click

Discussion in 'ASP .Net Datagrid Control' started by Sytelus, Nov 22, 2004.

  1. Sytelus

    Sytelus Guest

    When DataGrid with paging enabled shows numeric links for pages, you
    get OnPageIndexChanged event fired when user clicks on any of the page
    links - except the very first! Have anyone seen this behavior and know
    any workarounds? The current workaround I know of is to look at
    IsPostBack and Request.Form("__EVENTTARGET") and see if its set at
    "GridName:_ctl0:_ctl1" or something like that which means first link
    was clicked.
    Sytelus, Nov 22, 2004
    #1
    1. Advertising

  2. Isn't that expected behaviour? After all, the index hasn't changed if you
    don't go anywhere except where you are.

    "Sytelus" <> wrote in message
    news:...
    > When DataGrid with paging enabled shows numeric links for pages, you
    > get OnPageIndexChanged event fired when user clicks on any of the page
    > links - except the very first! Have anyone seen this behavior and know
    > any workarounds? The current workaround I know of is to look at
    > IsPostBack and Request.Form("__EVENTTARGET") and see if its set at
    > "GridName:_ctl0:_ctl1" or something like that which means first link
    > was clicked.
    Ken Cox [Microsoft MVP], Nov 23, 2004
    #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. Serdar Kalaycý

    asp button click event does not fire

    Serdar Kalaycý, Aug 12, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,462
  2. roni
    Replies:
    2
    Views:
    433
  3. Janet Collins
    Replies:
    0
    Views:
    1,131
    Janet Collins
    Jan 13, 2006
  4. Amy
    Replies:
    0
    Views:
    960
  5. roni

    first click wont fire on dynamic load of usercontro

    roni, Aug 6, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    115
Loading...

Share This Page