RadzenDataGrid should cascade the RadzenDataGrid class to the entire component #1089

Closed
opened 2026-01-29 17:48:48 +00:00 by claunia · 0 comments
Owner

Originally created by @djatkinsrealis on GitHub (Jan 14, 2024).

I would like to add custom components to the HeaderTemplate (or elsewhere inside RadzenDatagrid), that can reference the RadzenDataGrid to obtain information. e.g. a custom header showing data stats

Using @ref, between disconnected components, is more difficult as they appear to only be set after initial render so are often null.

At the moment the DataGrid is cascaded to the initial Columns collection only. It would be useful if that cascading value was wrapped around the entire DataGrid.

Splitting the CascadingValue to lines 8 (before all HTML) and 435 (just before @code) does not seems to adversely affect the tests or the RadZen DataGrid demos.

While there are alternatives, this seems to be the simplest way to extend RadzenDataGrid without putting custom code in components that contain a RadzenDataGrid.

Originally created by @djatkinsrealis on GitHub (Jan 14, 2024). I would like to add custom components to the HeaderTemplate (or elsewhere inside RadzenDatagrid), that can reference the RadzenDataGrid to obtain information. e.g. a custom header showing data stats Using @ref, between disconnected components, is more difficult as they appear to only be set after initial render so are often null. At the moment the DataGrid is cascaded to the initial Columns collection only. It would be useful if that cascading value was wrapped around the entire DataGrid. Splitting the CascadingValue to lines 8 (before all HTML) and 435 (just before @code) does not seems to adversely affect the tests or the RadZen DataGrid demos. While there are alternatives, this seems to be the simplest way to extend RadzenDataGrid without putting custom code in components that contain a RadzenDataGrid.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1089