Hello,
i read some stuff about virtualization here for the XamDataGrid.
I'm not sure but as FieldSettings can enable virtualization the Infragistics.Virtualization does not seem to be what i need.
I need some kind of list window meaning i wanna give the XamDataGrid the ListSize : Int32 and the xam datagrid shall request the currently displayed ListWindow by giving a startIndex:Int32 and a ITemCount:Int32. I will then load the currently viewed ListItems from a file. I think microsoft calls this virtualization which works for ListViews etc.
Is such behaviour possible with XamDataGrid.12.1 ?
Thanks for your help!
Hello KarlMichael Beck,
Regarding virtualization of the XamDataGrid, the XamDataGrid uses virtualization in the way that the containers and presenters for the cells and records of the grid are virtualized when they are out of view. These containers are then recycled and reused as the grid is scrolled for performance purposes.
Being that it sounds like you are looking to have a specific number of records show up in the grid at a particular time, I don't believe this is really a virtualization issue, but more of a pagination/paging type of issue. The XamDataGrid does not currently have paging support, but the other Infragistics grid, the XamGrid does. You can read about XamGrid paging at the following documentation site, and this was supported in version 12.1: http://help.infragistics.com/Help/Doc/wpf/2012.1/clr4.0/html/xamgrid_paging.html.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
thanks for your reply. I could do it with paging but that's not what i was looking for. I don't want these "Page 1, 2, 3" Buttons above the list, I wanna just scroll in the list as if the whole list was loaded. But the items shall be loaded on demand. That's quite similar to paging except the control must be able to view several pages at once and the page is switched by scrolling vertically in the list.
Kind regards,
kmb
Hello KarlMichael,
In version 12.1, there wasn't really any virtual data source support where the XamDataGrid would automatically load its data source on demand. Support for OLAP data sources has just recently been added in version 16.1, which you can read about here: http://help.infragistics.com/doc/WPF/2016.1/CLR4.0/?page=xamDataGrid_AsynchronousPagingDataSource.html. You may be able to do something like this in version 12.1 by handling the RecordsInViewChanged event of the XamDataGrid and populating your underlying data source as you scroll, but there was no formal support for "load on demand" behavior in the 12.1 XamDataGrid that was built-in.
It is worth noting though, that the XamDataGrid has essentially always implemented a virtualizing technique for its cell and record presenters by default. If you doing this "load on demand" for fear that the XamDataGrid won't perform as well, you need not worry, as the records and cells that are out of view are virtualized. That is, the containers that present your data will be recycled. This essentially means that the XamDataGrid performs just as well with 100 records as it does 1 million as far as startup performance is concerned.
Hi Andrew,
thank you. I decided to take care of the current position and populate the records on demand as you suggested.
With a style that triggers to ScrollViewer.ORientation=Vertical setting visibility to collapsed i removed the scrollbar and replaced it by my own scrollbar which shows the whole range of the list where the XamDataGrid only shows the Items visibble in the list-window. That works good.