DataGrid Pagination

Discussion in 'ASP .Net' started by Joseph D. DeJohn, Jul 4, 2003.

  1. I am trying to get pagination working on a datagrid. Can anyone point me to
    a resource for help on this? I'm not sure if custom paging is the best
    option or not.
     
    Joseph D. DeJohn, Jul 4, 2003
    #1
    1. Advertising

  2. hi,
    I posted a similar post below.
    datagrid does paging for you, u just set AllowPaging=true for datagrid.
    it's said that custom paging is not paging at all, no page index appeared
    at the bottom if you use custom paging.

    what kind of datasource u r using for datagrid control,it seems that
    matters
    too.

    Yangtsi.



    "Joseph D. DeJohn" <> дÈëÏûÏ¢ÐÂÎÅ
    :Oz0Qn#...
    > I am trying to get pagination working on a datagrid. Can anyone point me

    to
    > a resource for help on this? I'm not sure if custom paging is the best
    > option or not.
    >
    >
     
    Yangtsi River, Jul 4, 2003
    #2
    1. Advertising

  3. I saw your post, but the default pagination is having problems working. I
    opted for the only other alternative. You can guess. I am using a SQL
    datasource. Can't believe you are having problems with custom paging also.
    Dunno what to think at this point.

    "Yangtsi River" <> wrote in message
    news:...
    > hi,
    > I posted a similar post below.
    > datagrid does paging for you, u just set AllowPaging=true for datagrid.
    > it's said that custom paging is not paging at all, no page index appeared
    > at the bottom if you use custom paging.
    >
    > what kind of datasource u r using for datagrid control,it seems that
    > matters
    > too.
    >
    > Yangtsi.
    >
    >
    >
    > "Joseph D. DeJohn" <> дÈëÏûÏ¢ÐÂÎÅ
    > :Oz0Qn#...
    > > I am trying to get pagination working on a datagrid. Can anyone point

    me
    > to
    > > a resource for help on this? I'm not sure if custom paging is the best
    > > option or not.
    > >
    > >

    >
    >
     
    Joseph D. DeJohn, Jul 4, 2003
    #3
  4. Joseph D. DeJohn

    Daniel Bass Guest

    allowpaging passes control to the datagrid to take care of most of it, all
    it means is the control divides up the page according to your page count,
    you still have to instantiate a post back procedure that handles switching
    to the different pages...

    custom pages does work, but it doesn't split the pages up for you, you've
    more control, and hence have to do more work with the control to get the
    results you want... (you may want all the records in may 2000 in one page,
    for example, and there may be more in june, so a straight count that the
    allowpaging uses wouldn't work...)

    the postback method is easy enough.

    Sub MyDBgrid_Paging(sender As Object, e As DataGridPageChangedEventArgs)
    MyDBgrid.CurrentPageIndex = e.NewPageIndex
    BindData()
    End Sub


    this simply gets the number that was clicked on from 'e', then tell the grid
    what page it's on before binding the data.

    good luck


    "Joseph D. DeJohn" <> wrote in message
    news:...
    > I saw your post, but the default pagination is having problems working. I
    > opted for the only other alternative. You can guess. I am using a SQL
    > datasource. Can't believe you are having problems with custom paging

    also.
    > Dunno what to think at this point.
    >
    > "Yangtsi River" <> wrote in message
    > news:...
    > > hi,
    > > I posted a similar post below.
    > > datagrid does paging for you, u just set AllowPaging=true for datagrid.
    > > it's said that custom paging is not paging at all, no page index

    appeared
    > > at the bottom if you use custom paging.
    > >
    > > what kind of datasource u r using for datagrid control,it seems that
    > > matters
    > > too.
    > >
    > > Yangtsi.
    > >
    > >
    > >
    > > "Joseph D. DeJohn" <> дÈëÏûÏ¢ÐÂÎÅ
    > > :Oz0Qn#...
    > > > I am trying to get pagination working on a datagrid. Can anyone point

    > me
    > > to
    > > > a resource for help on this? I'm not sure if custom paging is the

    best
    > > > option or not.
    > > >
    > > >

    > >
    > >

    >
    >
     
    Daniel Bass, Jul 4, 2003
    #4
    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. Sreejumon[MVP]

    Re: datagrid custom pagination

    Sreejumon[MVP], Jul 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    442
    Sreejumon[MVP]
    Jul 8, 2003
  2. Child
    Replies:
    0
    Views:
    342
    Child
    Aug 19, 2003
  3. =?Utf-8?B?UkI=?=
    Replies:
    2
    Views:
    2,301
    =?Utf-8?B?UkI=?=
    Oct 14, 2004
  4. AVL

    pagination in dynamic datagrid

    AVL, Mar 25, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    442
    Michael Nemtsev [MVP]
    Mar 25, 2008
  5. Julia B
    Replies:
    2
    Views:
    1,493
    Julia B
    Oct 2, 2008
Loading...

Share This Page