Thank you,
this example is very nice and it works exactly as I'd like, but it has a big problem: the OrderInfoRepository.PopulateOrders method is called only one time at startup.
So all the records are read from the database and put in memory. If I have a lot of records you can agree this is a big problem and waste of memory and makes pagination useless.
But I'd like a way to always load only 16 records per time from the database (the number of records displayed by the datagrid), related only to the current shown page.
I'd like to have the possibility to have a callback functions that indicates to the datagrid how many pages we have in the database according to the current filters, but witout loading all the records.
So I'd like the datagrid asks to a callback function to have the records for the current page.
I'd like, even if only one page of records have beeen loaded in memory, the user is able to filter and sort on ALL records in the database: as soon as he confirms a particular filter or a sort order, I'd like a callback function is called to the repository to reload the records of the current page (discarding the current ones) according to the new filters and sortings (so these information have to be passed to this callback function).
Is there such a possibility in the library?