Add some extensibilities on Grid OnRowClick and access to MouseEventArgs #94

Open
opened 2026-01-29 17:31:26 +00:00 by claunia · 0 comments
Owner

Originally created by @rossbyte on GitHub (May 16, 2021).

Is your feature request related to a problem? Please describe.
First of all just want to say a big thank you to the Radzen team :).

We have been using Radzen extensively in our project and for Grid components we have business requirements to replicate Winform grid like behaviors on top of RadzenGrid, things like Ctrl+click to add to row selection, Shift+click to range-select rows, right click row context menu etc.

Which we have been able to achieve(not elegantly) on RadzenGrid by preventing default click on grid row and inserting a 100% width div in the grid cell to handle the click event. Sure we can hook into RowClick event, but it doesn't allow us to override the select row behavior on the RadzenGrid, nor gives us the MouseEventArgs that we need to check for Ctrl, Shift etc keys.

Describe the solution you'd like

  • In RadzenGrid.razor, mark OnRowClick as protected internal virtual to allow some extensibilities during row click.
  • Pass MouseEventArgs from RadzenGridCell onclick to OnRowClick so that we can determine the key combination and perform different row selection strategies or launch context menu

Please let us know what you guys think, happy to raise PR if this is reasonable change.

Regards
Ross

Originally created by @rossbyte on GitHub (May 16, 2021). **Is your feature request related to a problem? Please describe.** First of all just want to say a big thank you to the Radzen team :). We have been using Radzen extensively in our project and for Grid components we have business requirements to replicate Winform grid like behaviors on top of RadzenGrid, things like Ctrl+click to add to row selection, Shift+click to range-select rows, right click row context menu etc. Which we have been able to achieve(not elegantly) on RadzenGrid by preventing default click on grid row and inserting a 100% width div in the grid cell to handle the click event. Sure we can hook into RowClick event, but it doesn't allow us to override the select row behavior on the RadzenGrid, nor gives us the MouseEventArgs that we need to check for Ctrl, Shift etc keys. **Describe the solution you'd like** - In RadzenGrid.razor, mark OnRowClick as *protected internal virtual* to allow some extensibilities during row click. - Pass MouseEventArgs from RadzenGridCell onclick to OnRowClick so that we can determine the key combination and perform different row selection strategies or launch context menu Please let us know what you guys think, happy to raise PR if this is reasonable change. Regards Ross
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#94