I have a xamdatagrid that uses checkboxes for multi-selections. I can get it to work however whenever the user will click the scrollbar or filter the selected items disappear. Is there a way I can preserve the selected items? Or has there been a fix for it yet?
Hi dvickerie,
I've contacted our development team for their feedback on this issue. I'll get back to you shortly once I have a response from them.
Is there a way I can bind the checkbox in the record selector to cell.IsSelected other than Record.IsSelected? When I changed it from Record.IsSelected to Cell.IsSelected in didn't like it.
Thank you for providing the sample. I'm able to see what you described about the Ctrl and Shift functionality not working. This is actually by design and it isn't that the functionality no longer works but that selected items are cleared when a cell enters edit mode. That's just the way the grid was designed. That's also the reason why you need to double click when the CellClickAction is set to SelectRecord. Otherwise clicking a row would put a cell in edit mode which would clear the selected records.
I've attached a sample application to provide a better example.
I figured out what I was doing wrong and found a fix for that. However my issue I'm having is I've bound IsChecked to the Record.IsSelected:
IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Record.IsSelected, Mode=TwoWay}"
It works fine when the setting CellClickAction="SelectRecord" however the users' dont want to have to double click to edit a records so if I change the setting to EnterEditModeIfAllowed the CTRL and SHIFT functionality no longer works. I tried in the CellActivated event to set the cell.Records.IsSelected to true however that didn't work for me. Unfortauanely the Josh Smith example wouldn't satisfy our needs.