We have a ViewModel and have created a custom data adapter that we are assigning to a data grid.
Editing works great, we can Add, Update and Delete via our custom data adaptor directly invoked from the data grid.
This all works very nicely (thank you for that!).
On the services side, we follow the CQRS + EventSourcing pattern, thus our write and read stores are separated by intent. Our write store is EventStore while our read store is a projection view in Elastic Search.
We would like to control paging such that when we query from the Elastic read model, we pass through an Elastic query that contains the skip/take state from the pager attached to data grid.
Assuming we have 1 million documents in Elastic and let's say we only want to pull down pull down 10 rows of data at a time. The ViewModel knows the the total count and thus can provide the total number of pages.
How can we implement this.