paging not occuring

Discussion in 'ASP .Net Datagrid Control' started by Sabina, Feb 16, 2005.

  1. Sabina

    Sabina Guest

    i have placed a datagrid control inside a user control.iam adding the
    columns dynamically to the datagrid and populating it with records.to enable
    paging i have set allowpaging property to true ,paging mode as NextPrev and
    set the nextpage text as next and prevpage text as prev have also added the
    pageindexchanged handler.now the problem is if there are two pages when i
    click next its going to the pageindexchanged handler and the second page is
    loaded now when i click prev without going to the pageindex changed handler

    its going to the back page but again when i click next goes to the pageindex
    changed handler and an index out of range exception is thrown.i think since
    its not going to the pageindex changed handler when i click the prev button
    the currentpageindex is not getting decremented so when i go from page 2 to
    page1 currentpage index is 1 and when i click next its becoming 2.and if
    there are only two page records its an error.
    can anyone please suggest a solution to this problem.
    regards
    sabina
     
    Sabina, Feb 16, 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. Brian Birtle
    Replies:
    2
    Views:
    2,071
    John Saunders
    Oct 16, 2003
  2. =?Utf-8?B?TmlzaGVldGggS2F1c2hhbA==?=

    Error occuring when i execute Fire method of BaseEvent Class

    =?Utf-8?B?TmlzaGVldGggS2F1c2hhbA==?=, Dec 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    411
    =?Utf-8?B?TmlzaGVldGggS2F1c2hhbA==?=
    Dec 7, 2004
  3. Mossman
    Replies:
    1
    Views:
    531
    cbDevelopment
    Dec 12, 2005
  4. TS
    Replies:
    2
    Views:
    4,289
    Steven Cheng[MSFT]
    Jan 23, 2006
  5. Kyle

    Validation Not Occuring

    Kyle, Feb 7, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    474
    George Ter-Saakov
    Feb 7, 2006
Loading...

Share This Page