Hi,
I have a 3-tier application (WCF, WPF, Prism, Unity and MVVM), I receive 1M models (for example Person) from the server which need to be shown in the XamDataGrid. My ViewModel exposes an ObservableCollection<PersonViewModel>, where PersonViewModel are simply wrapper around the model Person. Those wrapper are kind of big, and long to construct since the constructor parameters are mapped dynamically by unity framework. Would it be possible to lazy build those wrappers and ideally recycle them (basically virtualize them), so that only the shown records have a wrapper instance? It's require that the solution work with filtering, sorting and grouping!
Thanks,Dominik
Hello Dominik,
The XamDataGrid requires all of the records to be loaded to provide filtering, sorting and grouping.
If you have further questions, please let me know.
Thanks,
Hi Francis,
Thanks for your answer.
Still, do you have any suggestion to handle that kind of problem.
Regards,
Dominik
Dominik,
Do you have any questions in light of the reply from Engineering above?
Sorry for the delay.
Thanks for your research, just by any chance do you have a small example of a virtualizing datasource that support recycling. Because, I didn't figure out when an item (PersonViewModel instance) is used by XamDataGrid. So that the datasource know when he have to build an item and when he can recycle an item (for a specified index).
I checked with the WPF team lead, and we do not have any such sample. I have also sumitted a suggestion to our Product Guidance team for a sample of this kind, but I cannot guarantee if or when we will have one.
Francis,
Thanks, for your help.
Looking forward for updates.
Hi Dominik,
I have logged Feature Request FR13634 for a sample or component that implements a virtualied datasource supporting recycling. I have sent you details in a private support case.
Thanks, I really appreciate the effort that you and Infragistic team do to awnser our business needs.
On a side note, if possible, it would be appreciated if the solution for that problem could support the MVVM pattern.
Thanks, continue the good job,