Planned
Last Updated: 16 Sep 2020 11:05 by ADMIN
Scheduled for 2.18.0
tilt32
Created on: 09 Mar 2020 10:12
Category: Grid
Type: Feature Request
10
Conditional row and cell class for styling

Based on row values, I want to style the entire row.

It could perhaps be exposed through something like a "<RowDescriptor>" element inside the <GridColumns>

//ADMIN EDIT: We plan to extend this item so that it includes not only row styling, but also the ability to add CSS classes to the cells, without having to use the Template.

4 comments
ADMIN
Marin Bratanov
Posted on: 23 Jul 2020 13:32

Hi John,

I am going to count this as a vote for a "row creating" type of event, as that's what I see in the linked article. If I am missing something, let me know.

 

Regards,
Marin Bratanov
Progress Telerik

John Campion
Posted on: 22 Jul 2020 21:26
Following up: jJust some simple way to add classes to a row at a time would be enough.  I do like the simplicity of the DevEx approach though.  It can be used for either row or cell customizations without have to generate a template for each column
John Campion
Posted on: 22 Jul 2020 21:24

I need this too. I would suggest something similar to DevEx's implementation:

https://demos.devexpress.com/blazor/GridHTMLDecoration

ADMIN
Marin Bratanov
Posted on: 09 Mar 2020 10:15

For the time being, a solution is available in this KB article: https://docs.telerik.com/blazor-ui/knowledge-base/grid-conditional-cell-background

Another approach might be an event like "RowCreating" that provides you with the model in the arguments, and another field in the arguments can take the Class you want to apply to the row.

Please post your ideas on how you would want such a thing to be exposed, considering that we need to keep control over the <tr> element rendering so we can apply the necessary classes and attributes so that the grid will function.

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor