This project has moved. For the latest updates, please go here.

Use DataGrid with asynchronous loading....

Nov 23, 2012 at 10:20 AM

I have a Function wich can get my data paged: getDatFunc(page, pageSize) and also a function to get my count of data rows. Can i use this both to fill the DataGrid with DataVirtualisation?

Can anyone tell me how? Are there any examples available?

Editor
Nov 23, 2012 at 11:51 PM

Where is getDatFunc(...) itself getting the data from?

The DataGrid needs to handle paging on its own, fetching data asynchronously from the data source. I'll see if one of the datagrid devs can answer your question, but meanwhile, it would be interesting to know where the source data comes from (if it isn't generated by getDatFunc(...) itself).

Nov 25, 2012 at 10:30 PM

From a Database, but this is a own implemented Layer...

Editor
Nov 28, 2012 at 3:45 PM
Edited Nov 28, 2012 at 3:45 PM

I would suggest looking into the Data Virtualization options, specifically the use of the DataGridVirtualizingCollectionView.

If your data source implements the IQueryable or IQueryable<T> interface, then you could also look at the DataGridVirtualizingQueryableCollectionView.

You could then call your getDatFunc() function in the QueryItems event that is required by these CollectionViews.

Documentation:
http://doc.xceedsoft.com/products/XceedWpfDataGrid/Data_Virtualization.html