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

Use <span> in a grid column value

1 Answer 588 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 2
Dan asked on 06 Jun 2014, 12:30 PM
I'm trying to change the color of some column values by setting the data value of these to "<span class='redcolor'>value</span>"

This doesn't work as it just displays the span and everything as text in the column even though the table element renders as
<td role="gridcell"><span class='redcolor'>value</span></td>

Is there a different way to accomplish this?  Thanks.

Dan

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 09 Jun 2014, 03:02 PM
Hello Dan,

Column values are by default encoded and you need to disable that in your case. Please refer to our documentation.

http://docs.telerik.com/kendo-ui/api/wrappers/aspnet-mvc/kendo.mvc.ui.fluent/gridboundcolumnbuilder#methods-Encoded(System-Boolean)

Regards,
Dimo
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Dan
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or