Paging a DataGrid or similar control...?

  • Thread starter Thread starter MJB
  • Start date Start date
M

MJB

I have a windows application that returns 10s of thousands of rows to a
DataGrid (for all intents and purposes you can assume that it's a DataGrid,
I'm actually using the Infragistics UltraWinGrid though). Due to the ever
growing amount of data I want to implement some sort of record paging.
There are a lot of examples for ASP.Net but not many for windows
applications. I am planning to use some of the techniques used for ASP.Net,
but I was hoping someone out there may have a few suggestions specifically
for a windows application. Also, I am using MSDE as my database backend.

Thanks
 
Several thousand rows from an MSDE? You are aware of the 4 gig limitation I
hope - just being prudent thats all. :)

As far as paging goes, the concepts are fairly the same between windows apps
or web apps, the only big difference being that windows apps allow you to
rely on the client a little bit more. You could in essence page without even
going to the server. You could store the dataset in one shot (if it's
practical enough), and using a dataview you could page from page to page.

Alternatively a rather simple of implementing paging is by using one of the
overloads of the dataadapter.fill method and specifying exactly what page
you are looking for (well almost that straightforward).

Depending upon your exact constraints, Your right answer is probably
somewhere between the above two.

- Sahil Malik
http://www.dotnetjunkies.com/weblog/sahilmalik
 
Back
Top