DataGrid: Get the mouse qualifier keys in OnCellClick? #3801
-
Hi, is there a way to get whether the CTRL and/or SHIFT key is currently pressed down in the DataGrid OnCellClick callback? In our application we have a razor component wrapper around FluentDataGrid that changes how multi-select works to be a bit more Windows like, among other functionality. That is, clicking on a not selected row sets the selection to that row and deselects other rows, for example. I have implemented this using a custom OnCellClick handler. However, now I have been asked to add typical CTRL-click and SHIFT-click support as well, i.e. clicking on a row then SHIFT-clicking on another row adds the range to the selection. Hence the need to be able to get the mouse qualifiers in OnCellClick. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, We currently do not pass the state of any keys in the OnCellClick callback. Can imagine that would be handy information to have. We'll look and see if it will be possible to include this in the next version of the library. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help. In the meantime I may be able to do it using TemplateColumns and having a surrounding div in the content that has an onclick handler. It's a bit of work but doable I think. |
Beta Was this translation helpful? Give feedback.
Hi,
We currently do not pass the state of any keys in the OnCellClick callback. Can imagine that would be handy information to have. We'll look and see if it will be possible to include this in the next version of the library.