ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: alonewolf149 on August 31, 2020, 09:37:42 pm
-
Hi,
i make a condition and dynamic color, but color is not showing full.
http://prntscr.com/u92ppb
can u guide how to render css background, currently i insert more DIV, so it has some padding area.
http://prntscr.com/u92q61
how can i do style background full cell ex: http://prntscr.com/u92qpx
Thanks
-
Conditional styles are added to cells by returning style property in column.render callbacks.
'background-color' is applied to the whole cell.
return {
style: { 'background-color': '#ff0000' }
};
Example: https://paramquery.com/pro/demos/condition_style
-
Hi,
when i change from
render : function(ui){
var bgColor = ui.rowData.flag_bg_color;
var fontColor = ui.rowData.font_color;
return "<div style='width: 100%; height: 100%; background-color: "+bgColor+"; color: "+fontColor+"'>"+ui.rowData.label_flag+"</div>"
},
to
render : function(ui){
var bgColor = ui.rowData.flag_bg_color;
var fontColor = ui.rowData.font_color;
return {
style: { 'background-color': '#ff0000' }
};
},
Cell is not showing any background.
can u help ?
Thanks
-
Please mention the version of pqgrid.
Please also share a jsfiddle so that I can check your code.