Hi I’m trying to set the background colour of a jqxdatatable cell using a variable.
I have looked at the example for conditional formatting, but it uses hard-coded classes.
My colour data will come from the back-end.
The problem I’m having, is when I put a <div> with a coloured background into the <td>, I can’t get the <div> to completely fill it.
Its like there is a border around the <div>.
Is there some way to override this? Thanks.
columns: [
{ text: 'Status', datafield: 'Task_Button', cellsformat: 'd', filtertype: 'range', width: '100',
cellsRenderer: function (row, column, value, rowData, some_variable ) {
var cellhtml = '<div style="width: 100%; height: 100%; background-color: ' + some_variable + '; ">';
cellhtml += value + '</div>';
return cellhtml;
}
},
//
// more columns...
//
]