Kendo UI Grid cell background color
angularjs, javascript, kendo-grid, kendo-ui
Solution
how to add conditional cell background?
what it does is: it builds a text row template from all parameters if there is no row template given. it is possible to add template text in most of the parameters like:
...
//},
columns : [
{
title : 'Questions Translated',
attributes:{ 'style':"#=questions!==questionsMax?'background-color: red; color:white;':''#" },
field : "questions",
width: 140
},
...
Problem
In kendo ui grid how can i change the background color? I've tried to set the template for the column but when the grid is visualized, it's empty without any color. I have this code: ``` $scope.thingsOptions = { sortable: "true", scrollable: "true", columns: [ { field: "Colore", title: "Colore", width: "160px", template: "<div><span style='background-color:red'></span></div>" } ] }; ``` How can i apply a template to color the background of the cell