Hi everyone,
I would like to change the Content Template of the Row Selector and I used this article.
https://ko.infragistics.com/community/blogs/blagunas/archive/2012/07/16/xamgrid-data-bind-checkbox-in-row-selector.aspx
But I stuck with the weird problem when I scroll my data, checkboxes which shouldn't be in the checked state are checked. Look like it depends on virtualization but how can I handle it?
I attached a project where the issue exists and made a video with reproducing.
Thanks, it helps:)
Hello Boris,
I have been investigating into the sample project you have provided, and you are correct in that the checkbox state that you are seeing is caused by the virtualization of the XamGrid. The Checkbox elements that you have placed in the RowSelectorCellControl currently do not have their IsChecked properties bound to anything, and so when they are "recycled" by the virtualization methods of the grid, they may or may not show up checked if there exists mix of checked or unchecked Checkbox elements in your grid.
In order to prevent this, I would recommend adding a property to your underlying data item that you can bind to that designates whether or not the row should be checked. The data context of the RowSelectorCellControl is the underlying data item that makes up the row, and so if you use a RelativeSource AncestorType binding to your RowSelectorCellControl, you can provide a Path of "DataContext.<IsSelectedProperty>" to bind to it.
I have attached a modified version of the sample project you sent to demonstrate. I hope this helps.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer