Selecting a DataGrid row on right mouse button click #4799
Unanswered
klicpjan
asked this question in
Questions & Help
Replies: 1 comment
-
A cool idea! That should be helpful in our project as well. It would be possible to implement it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, we are using context flyout menus (setting the
Property="toolkitControls:DataGridRow.ContextFlyout"
) in our datagrid to allow the users to perform specific actions on the datagrid rows. This works well for single-selection actions, as we are able to bind the row context with the data action.However, we would like to allow the user to select multiple records and perform the context menu action on the multiple selected rows. The user can select multiple rows by left-clicking on them. The issue with this approach is the fact that right-clicking a row does not select it. This means that if the user wanted to perform an action on a single row, they would first have to select using left click. Another problem is when a user has made a selection but right-clicks on a row that is not part of that selection. We would like that right-click to cancel the multi-selection and select the single row.
Essentially, we would like it to behave the same way the windows file explorer works - if you right-click a file, it selects it. If you select multiple files but then right-click outside of that selection, it cancels out the selection and selects the single file. The desired functionality is showcased in the attached gif.
So the question is - is there a way to mark rows as selected in the datagrid using right-click mouse button?
Beta Was this translation helpful? Give feedback.
All reactions