Suppose I have ria service to load data based on EF. Then I create IPagedCollectionView as ItemSource for XamGrid in order to apply paging.
Question is: Ria service always load all data at one time, but page only display partial data based on page size.
So I want xamGrid synchronized with ria service data loading. Only load those data for displaying for performance issue.
If I have thousands of rows of data loaded and pagesize=30, it make no sense to load all thousand of row at one time and it even could crash the browser.
How to implement this request?
meant to put this here Getting Started with Virtual Collection
I'm not sure if this will help but check this out I believe this is what you are looking for
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=RIA_Using_RIA_And_XamDataGrid.html
Ok,
So the xamGrid looks a the Collection it's handed. In order for it to do paging properly it needs to know about the total number of items of data in the collection.
The DomainDataSource handles all of this automatically as it's Data property is an IPagedCollectionView. When you request another page, it then goes to the server and sends back new data.
However, if you need all the data on the server as it stands, then i'm not really sure why you don't want the xamGrid to look at it? All of the rows/cells are virtualized, which means it won't be creating controls for every cell/row in the grid. It just creates controls for whats in view.
Now, if you have your grid in a container that gives it infinite height/width, then everything will be rendered and you'd run into perf issues. Containers that do this are Stackpanel's and ScrollViewers. (Note: if you have a height/width set on the xamGrid then it wouldn't be an issue)
-SteveZ
I don't use DomainDataSource. I use VM to load all data and convert it to IPagedCollectionView and the feed data for XamGrid.
I need to change the query dynamically in the code. So I use VM for this not DomainDataSource.
So if I use IPagedCollectionView, what's the solution?
Hi,
If you use the DomainDataSource, then Ria will only pull down data for that specific page. (Note: the data will need to be sorted first)