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

Cannot apply class or style with columns.attributes object

2 Answers 541 Views
Grid
This is a migrated thread and some comments may be shown as answers.
telefunken
Top achievements
Rank 1
telefunken asked on 24 Jan 2013, 09:26 PM
columns: [
    { field: "id", attributes: {"class": "someclass", style: "color:#0c0"} }
]
This part of the API reference explains the above definition:
http://docs.kendoui.com/api/web/grid#columnsattributes-object

someclass and/or the color css is never applied to the grid, any idea why?

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 25 Jan 2013, 02:35 PM
Hello,

I tried this code snippet and found a glitch with the code - the hash symbol from the color value should be escaped. Thanks for pointing this to us. We will update the documentation as soon as possible.

Here is a working JS Bin example. If this doesn't fit your case, please send us a sample of your code to assist your further.

Regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
telefunken
Top achievements
Rank 1
answered on 25 Jan 2013, 04:07 PM
thanks!
style: "color:\\#0c0"
escaping the hash seems to work
Tags
Grid
Asked by
telefunken
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
telefunken
Top achievements
Rank 1
Share this question
or