Custom Paging in Gridview/ASP.NET 2.0 without DataSource

  • Thread starter Stefan Broenner
  • Start date
S

Stefan Broenner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top