PDA

View Full Version : Lazy Intitialization of paging bar total count



hyps
23 Dec 2010, 5:05 AM
Hi,

I was wondering if it is possible to lazy initiate the total count of the paging toolbar.

I have an editable grid with about 300k data records which can be filtered. Of course, I have to use paging, but the counting of the data records takes very long. So it would be nice, if the grid would show the first, for example 50, data records, and load the total count for the paging toolbar in the background, while the user can already edit the first set of data records.

Has anybody an idea how or if this could be done?:)
I would really appreciate some help here... :D

hyp

Condor
23 Dec 2010, 5:12 AM
I did something different:

I changed the display text to not show the total number of pages, removed the 'last' button and made the server return total = last returned record + 1 if there were more records after that or total = last returned record if it actually was the last record.

hyps
23 Dec 2010, 5:29 AM
Thanks for your reply.
That certainly would solve that problem, but is there maybe a more elegant solution for this problem?

I think it would be a good idea to implement your solution, but let a script in the background load the exact number, overwrite the false count and then show the "last" button and the number of pages/date records.

If anybody already did something like that, I would really appreaciate if he/she would post it here.
If not... well I will try to code it and then post my solution here.;)

Condor
23 Dec 2010, 5:50 AM
Haven't seen anybody do that yet... I think you will have to write that yourself.