ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: kiwon34 on July 26, 2017, 01:32:21 pm
-
1. Is there a way to designate the row count when using stripeRows option? For example,. I want to give option for every 5 rows to be changed.
2. How do I remove a certain column's right or left border when 'columnBorders' option is true?
3. Way to display one record in multi-line?
-
1. css nth selector for rows ( .pq-grid-row ) can be used instead of stripeRows option to highlight every 5th row.
2. grid cells have right borders only.
To remove it for a column, assign some class to that column. cls: 'noborder'
And write a css rule.
.pq-grid .pq-grid-cell.noborder{
border-right-width:0;
}
3. use wrap: true
-
First one ( highlight every 5th row) can also be done with script with help of rowInit callback.
rowInit: function(ui){
if(ui.rowIndx%5 == 0){
return {style: 'background:red;'};
}
}
Example of using rowInit: https://paramquery.com/pro/demos/condition_style
-
Thanks a lot!
Though maybe I wasn't clear about the third question. What I meant about display in multi line for one record, if there is a json data such as {"a" : "AAA", "b" : "BBB", "c" : "CCC", "d":"DDD"...} for one record, I want to display "AAA" and "CCC" in one cell as multi line, and "BBB" and "DDD" in the right cell also as multi line. And other records continued to show the same.
Is this possible?
Please tell me if the question is still not clear.
-
It can be done with column.render callback
//column definition.
{
dataIndx: 'a',
render: function( ui ){
var rd = ui.rowData;
return rd.a + "<br/>" + rd.c;
}
}