This is a migrated thread and some comments may be shown as answers.

How to set header text color?

2 Answers 513 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Iron
Vincent asked on 10 Nov 2018, 09:56 AM
I want to set grid header style. I want to use html-attributes property. How to set html-attributes?

2 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetomir
Telerik team
answered on 14 Nov 2018, 04:29 PM
Hi Vincent,

I assume that you are using the Tag Helpers for creating the grid, am I correct? If that is the case, each of the columns has a header--attributes class. You can set the background color as follows:

<column header-html-attributes='new Dictionary<string,object>{ { "style", "background-color:green"} }' field="ContactName" title="Contact Name"/>

Let me know if your scenario is different and in case you need further clarifications.


Kind regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Vincent
Top achievements
Rank 1
Iron
answered on 16 Nov 2018, 01:54 PM
It is worked, Thanks a lot.
Tags
Grid
Asked by
Vincent
Top achievements
Rank 1
Iron
Answers by
Tsvetomir
Telerik team
Vincent
Top achievements
Rank 1
Iron
Share this question
or