Custom Paging in Gridview/ASP.NET 2.0 without DataSource

Discussion in 'ASP .Net Datagrid Control' started by Stefan Broenner, Jul 6, 2005.

  1. Hi,

    I want to implement custom paging in a GridView (ASP.NET 2.0, June 2006 CTP)
    without using a SQL or Object DataSource (for a variety of reasons).

    Our custom paging logic only retrieves a subset of the data from the
    database (e.g. 10 out of 100000 records when the PageSize = 10).

    Binding the data and working with the relevant events works fine.

    However, my problem is that I would need to tell the GridView how many
    records I actually have so that it could display the correct paging UI (right
    now I see only one page instead of 1000).

    Alternatively, I could also provide the number of pages. There is a property
    called PageCount but unfortunately it is read-only.

    Is there any way how I could do this or do I need to go back to the DataGrid
    (which supports this scenario just fine).

    Thanks in advance

    Stefan
     
    Stefan Broenner, Jul 6, 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. OJ
    Replies:
    0
    Views:
    532
  2. OJ
    Replies:
    2
    Views:
    4,038
  3. =?Utf-8?B?VG9tIEg=?=
    Replies:
    0
    Views:
    500
    =?Utf-8?B?VG9tIEg=?=
    Sep 26, 2006
  4. Kovan A

    Gridview + Custom Paging WITHOUT ObjectDataSource

    Kovan A, Jul 10, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    891
    Teemu Keiski
    Jul 11, 2006
  5. Kovan A

    gridview + custom paging WITHOUT objectdatasource

    Kovan A, Jul 14, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    228
    Kovan A
    Jul 14, 2006
Loading...

Share This Page