This is a migrated thread and some comments may be shown as answers.
Grid row style
1 Answer 262 Views
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 28 Nov 2019, 09:48 PM
How to apply style to a row (for example background color) inside a Grid? I've tried RowTemplate but the contents of a RowTemplate must be <td> elemets. If I wrap <td> elements inside a <div> the layout breaks.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 29 Nov 2019, 12:51 PM

Hello Robert,

Adding the desired classes and rules to the td elements is the way to go. Here's one example that we have in a KB article: https://docs.telerik.com/blazor-ui/knowledge-base/grid-conditional-cell-background.

If you don't need the rows colors to be dependent on the row data, you can simply inspect the classes and rules we have out-of-the-box, and add heavier selectors with the rules you want. This blog post can help you in doing that: https://www.telerik.com/blogs/improve-your-debugging-skills-with-chrome-devtools.

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or