I have a XamTreeGrid with SelectionTypeRecord="Extended" and RecordSelectorLocation="None". When there are more rows than can be displayed and the user selects two or more rows and then scrolls the XamTreeGrid so that the selected records are not visible any longer, the selection is changed. When scrolling back and forth so the selected records are visible and then invisible the records will sometimes be selected and sometimes not. Is there a property that I have missed to configure or is there anything else I can do to solve this problem or is it a bug?
BR
Hilma Maria
Resolved this by setting RecordContainerGenerationMode="PreLoad"
Hello Hilma,
It should not be necessary to set the RecordContainerGenerationMode in this case to “PreLoad,” as this will shut off the virtualization of the grid. This will cause some potentially very bad performance if you have a large data source, as it will try to generate all of the visual elements of the grid at startup.
I am curious what you are currently setting selection on in the application where this issue is present? Are you setting selection on the DataRecordPresenter by chance? I ask, as this can cause the behavior because by default, the DataRecordPresenter is recycled and reused as you scroll, which can cause unwanted visual behaviors if you set properties on it directly. You should instead mark the underlying Record as selected by setting its IsSelected property to true or adding it to the XamTreeGrid.SelectedItems.Records collection.
Please let me know if you have any other questions or concerns on this matter.