Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
How to prevent deselect in full-row single-select mode using ctrl + click selected row
posted

We are using XamDataGrid in our application using MVVM pattern and allowing user to select only one row at a time. When user selects a row, two buttons above the Grid will get enabled. This is the functionality which we need. 

So, when user selects Ctrl button on keyboard and clicks on left button on the same selected row, the buttons are getting disabled. This is because the selected row is getting deselected.  Is there any way to prevent this ?

I have tried to handle this through MouseDown event but that doesn't work as the SelectedDataItem property of the Grid is updating by the time this event gets hit.

Please provide a solution to handle this scenario.