QUESTION # 1:
I'm having a hard time trying to get the GridView pager to display the correct number of pages in its pager based on the number of records retrieved by LLBLGen.
Lets say my data source has a total of 1000 records and that I want each page size in the GridView to be 10. Traditionally, if I retrieve all 100 records in one fetch, this means that there will be 100 pages in my pager shown as something like "1 2 3 4 5 6 7 8 9 10 ... 100>>".
However, assuming that retrieving all 1000 records in one fetch is too inefficient each time, I would want to retrieve only 200 records during each fetch. I would do something like this:
myUsers.GetMulti(filters, 200, sorters, null, 1, 10);
However, doing this, my GridView would show no pager at the bottom at all because it only sees 10 records as its datasource, and thus it thinks there is only one page.
If I do this:
myUsers.GetMulti(filters, 200, sorters, null, 1, 200);
Then my GridView shows the pager such as "1 2 3 4 5 6 7 8 9 10 ... 20 >>". However, this is still not correct because the number of pages shown is not correct. The GridView only sees 200 records as its datasource. The correct number of pages is suppose to be 100.
Shouldn't there be an easy way to get LLBLGen paging to work with GridView paging, without having to implement my own paging in order to accomodate for LLGLGen's paging?
Question # 2:
Lets say I do this:
myUsers.GetMulti(filters, 1000, sorters, null, 1, 200); // Getting page 1
It would retrieve all 1000 records and give me the first 200 records (1-200).
if I immediately do another call such as:
myUsers.GetMulti(filters, 1000, sorters, null, 2, 200); // Getting page 2
Would the database be accessed again to retrieve the same 1000 records, before giving me records 201-400? Or would all this already be in memory and no DB access is required?
Question # 3:
I notice the LLBLGenDataSource object can have Paging allowed. Would this be the solution to my Question # 1?