With reference to this issue at CodePlex - https://wpfextendeddatagrid.codeplex.com/workitem/1065
I am reasonably certain there is a bug that prevents items that have value equality - as expressed through an override of "Equals" - but not reference equality - from being removed from the SelectedItems property even if IList.RemoveAt is called
with the proper item index.
- To recreate this, go to the above link and download both attachments.
- Download the source code for the project reference above (Extended Data Grid).
- Replace "DataGrid.cs" in the Extended Data Grid project with the "DataGrid.cs" file in DataGrid.zip that is attached to the issue.
- Build the Extended Data Grid Project.
- Use the resulting ExtendedGrid.dll to build the project that is attached to the issue as a demonstration.
- Use the exe from the issue demo project as the debug executable for the Extended Data Grid project and Run.
- Press Load Test Data
- control-click two different items in the list that have the same text in the File Name column
- Set a breakpoint in the Extended Data Grid function "DataGrid.MakeFullRowSelection" at the point where EndUpdateSelectedItems is called.
- Now control-click the second selected item and note that even though that item should be removed from the SelectedItems collection, it is not.