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
2385
mouse right click selection
posted

I want to get the same result with left click when I right click on a cell.

Now when I right click on a cell, I set isSelect is true. But it keeps other selected cell.

I hope the right click like left click, when I select one, the other is deselected.

And when I press Ctrl, I hope it can keep other selected items.

Do you have any idea?

  • 69686
    Suggested Answer
    posted

    Hello,

    What you can do is to clear the SelectedItems.Cells collection so that the XamDataGrid deselects the already selected cells when you right click a new one. When you are holding the Ctrl key, you would not do that in order to keep the current selection.