Reputation: 1229
Is it possible to have a DomainDataSource - which is being paged by a DataPager that is associated - have all entities instead of just those that belong to the current page? How? The paging is being done on the client side anyway, so maybe I could get all entities somehow.
Upvotes: 3
Views: 348
Reputation: 35544
You could set the PageSize and LoadSize of the DomainDataSource to 0. Then you should get all entities.
Upvotes: 1
Reputation: 93561
The purpose of paging is to ensure that you DO NOT get all entities on the client.
The page number and page size are turned into the equivalent of Skip(pageNumber * recordsPerPage)
and Take(recordsPerPage)
LINQ query elements and serialised across WCF to the server to be run there.
To get all elements (should that be what you actually need) you will need to get fetch the data via RIA without using a paged DomainDataSource.
You are likely better off processing the results you actually want on the server and return those to the client (e.g. in a custom entity). The key is to not ship unnecessary data across WCF.
Upvotes: 3