Make Grid more testable #1833

Closed
opened 2026-01-29 17:59:10 +00:00 by claunia · 2 comments
Owner

Originally created by @juanluispaz on GitHub (Aug 8, 2025).

Is your feature request related to a problem? Please describe.
Not related to any problem

Describe the solution you'd like
To make the test easier, RadzenDataGrid, I miss some components that can be used to query information and content of the grid, using Bunit FindComponent.

In the case of RadzenTable the structure is clear; for example, there are RadzenTableRow and RadzenTableCell, that allow me to query specific elements in the table.

In the case of RadzenDataGrid, there is a RadzenDataGridRow, but not a RadzenDataGridCell, making it challenging to query elements in the cells without messing with other cells.

Describe alternatives you've considered
It is quite cumbersome query the cell without doing massive gymnastics to find the proper element.

Additional context
Just adding a wrapper component here will make a huge difference.

It could be a component that receives the same params of the function and just internally call the same function.

This change will not introduce any breack change due this function is internal, and not possible to override.

Alternative: Make RadzenDataGrid.RenderCell public and virtual.

Originally created by @juanluispaz on GitHub (Aug 8, 2025). <!-- IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can request your feature via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. --> **Is your feature request related to a problem? Please describe.** Not related to any problem **Describe the solution you'd like** To make the test easier, RadzenDataGrid, I miss some components that can be used to query information and content of the grid, using Bunit FindComponent. In the case of RadzenTable the structure is clear; for example, there are RadzenTableRow and RadzenTableCell, that allow me to query specific elements in the table. In the case of RadzenDataGrid, there is a RadzenDataGridRow, but not a RadzenDataGridCell, making it challenging to query elements in the cells without messing with other cells. **Describe alternatives you've considered** It is quite cumbersome query the cell without doing massive gymnastics to find the proper element. **Additional context** Just adding a wrapper component [here](https://github.com/radzenhq/radzen-blazor/blob/90ab2e468eb7d51f804ea070f7822c901d3cbe52/Radzen.Blazor/RadzenDataGridRow.razor#L72) will make a huge difference. It could be a component that receives the same params of the function and just internally call the same function. This change will not introduce any breack change due this function is internal, and not possible to override. Alternative: Make [RadzenDataGrid.RenderCell](https://github.com/radzenhq/radzen-blazor/blob/90ab2e468eb7d51f804ea070f7822c901d3cbe52/Radzen.Blazor/RadzenDataGrid.razor#L526C29-L526C39) public and virtual.
Author
Owner

@enchev commented on GitHub (Aug 8, 2025):

RenderCell() actually is the result of an optimization related to the component render size across Blazor updates - the more internal components, bigger update footprint.

@enchev commented on GitHub (Aug 8, 2025): RenderCell() actually is the result of an optimization related to the component render size across Blazor updates - the more internal components, bigger update footprint.
Author
Owner

@juanluispaz commented on GitHub (Aug 9, 2025):

Understood,

I will look for another path having this in consideration.

Thanks!

@juanluispaz commented on GitHub (Aug 9, 2025): Understood, I will look for another path having this in consideration. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1833