Hello.
We recently upgraded from the 8.2 version of NetAdvantage for WPF to the 9.2 version. After the upgrade, we're seeing an issue where code that was working to programmatically clear selected rows is no longer functioning properly. Here's the simple code that we're using:
this.ourGrid.SelectedItems.Records.Clear();
Is there a new 9.2 way to clear all of the selected records in the grid?
Hello,
I tested the Clear method and it seems to work correctly. Another alternative is you to use commands :
xamDataGrid1.ExecuteCommand(DataPresenterCommands.ClearAllSelected);
I know this is old but I wanted to say I also felt as the OP did that the XamDataGrid.SelectedItems.Records.Clear() did not clear the selection as expected. The reason is that the Style for showing the Active Record and selected records (when the XamDataGrid does an does not have focus) is the same. I am using version 13.1 and the IGTheme displays selected rows and the active row with a light gray background. I think the expectation when clearing the selection is to not see any rows with any background color. I ended up with this simple two lines of code...XamDataGrid.SelectedItems.Records.Clear();XamDataGrid.ActiveRecord = null;