0
votes

I set column property like this:

columns: [
    {data: "data", renderer: "html"},
]

then, I set background color of cell like this:

cell: [
    {renderer: customRenderer}
]

in customRender I have set cell background. Unfortunetly as a result I get cell with proper background color, but without html render. How can merge this two render types or how to set color cell in html?

1

1 Answers

0
votes

You need to apply the renderers using type property.

Set column property as:

columns:[
  {data: "data", type: {renderer: htmlRenderer}}
]

And set cell property as:

cells: function (row, col, prop) {
        var cellProperties = {};    
        cellProperties.type = {renderer: greenRenderer}
        return cellProperties;
}

Please refer to fiddle for similar scenario http://jsfiddle.net/Mazzu/rmnzcwkr/