ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: ntoscano on October 28, 2016, 03:26:19 am
-
If a particular cell in a row as multiple styles ( bold, underline, top-align, etc..), how can you add the individual classes to the cell?
I've tried the following structure with no success:
var data = [
{rank:4, company:'BP', revenues:'267,600.0',profits: '22,341.0', pq_rowcls: "red", pq_cellcls: { "company": { color : "green", bold: true} },
{rank:5, company: 'General Motors',revenues: '192,604.0', profits:'-10,567.0'},
];
-
1. Css styles can be applied as either inline styles http://paramquery.com/pro/demos/row_styles
2. or by css classes, http://paramquery.com/pro/demos/row_class ( don't forget to check css tab in this demo)
3. there are also other ways to add styles like conditional styles. http://paramquery.com/pro/demos/condition_style
I assume your question is about adding multiple styles with help of css classes.
In JSON data define pq_cellcls: { company: 'some_cls' }
And in css assign css rules to that class:
tr td.some_cls{
color: green;
font-weight: bold;
text-decoration: underline;
}
Hope it answers your question.
-
Thanks, this solved my problem: http://paramquery.com/pro/demos/condition_style