Hi,
Please find attached a sample project demonstrating an issue with the XamDataGrid, when housed inside a tab control (or XamDockManager, I just used a tab control for simplicity in the example).
There is a single window, with a tab control inside, with two tabs. I've put a XamDataGrid inside each tab.
I've set a specific combination of settings, to turn off edit and record selectors and set the SelectionTypeRecord to 'single'. On the grid in the first tab only, I've set the CellClickAction to 'SelectRecord'.
Run the app, select the top record on the grid in the first tab. Now switch to the second tab... then back to the first again. The top record still appears to be selected, but try clicking on a different row... it now appears there are two rows selected even though SelectionTypeRecord is set to 'single'!
Snooping the app shows that only the second 'selected' record has IsSelected and IsActive set to true.... the top record has both these values set to false but is still showing in a 'selected' style.
The grid in the second tab, whose CellClickAction has been left on 'SelectCell', works as expected.
Dave
Hello Dave,
This issue was fixed in the service release that was made available on May 14. The build for this service release is 10.1.20101.2018. I tested your sample with this version and found that the issue was resolved.
This service release is available under your account at the Infragistics Website. To download the service release, log in to ‘My IG’ and select ‘Keys & Downloads’. Select the NetAdvantage tab and then click on the product name. The available service releases should now be listed on the page underneath the tab control.
Please let me know if you have any further questions or concerns about this matter.
Hi Jason,
I've downloaded the hotfix and it does fix the problem I described above... unfortunately I don't think it's working as it should still.
The problem appears to be that the SelectedItems.Records collection is getting cleared when you move to the second tab. I've updated my sample; tab 1 has a grid in (with extended record selection enabled) , tab 2 is empty. There is a label at the top of the window, bound to the grids "SelectedItems.Records.Count".
If you select a record on the grid, the count returns 1.
Now move to "Tab 2" and the count gets changed to 0.
Moving back to tab 1, shows the record you clicked on as "selected" but it is no longer in the selected items collection.
Furthermore - if you select multiple records in tab 1, the count shows correctly. Goto tab 2, count clears, and moving back to tab 1 just shows the last record of the extended selection as "selected".
Regards,