ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: jprocess on February 19, 2014, 02:54:11 am
-
Hi -
I am using this to get a specific cell:
var cell = $grid.pqGrid( "getCell", {rowIndx: 4, colIndx:3} );
and
$(cell).addClass('yellow');
to highlight t cell. It will work, but when I scroll the grid the style disappears.
Can I use pq_cellcls to highlight specific cells like I"m doing with pq_rowcls?
$grid.pqGrid( dir, {pq_rowcls: "orange"} );
I'm currently using it to highlight rows but cannot figure out how to do it with cells. i.e. pq_cellcls
Thanks much
-
Can I use pq_cellcls to highlight specific cells like I"m doing with pq_rowcls?
$grid.pqGrid( dir, {pq_rowcls: "orange"} );
What's dir in your code.
pq_rowcls and pq_cellcls are meant to add classes to rows and cells directly in JSON data. It's useful when you are loading data from remote server.
e.g if your rowData is { name 'henry' , age: 30 }
and you want to add yellow class to age field in this row.
your row data would look like { name: 'henry', age: 30, pq_cellcls : { age: 'yellow'} }
or
Alternatively you can use API to add class
$grid..pqGrid( "addClass", {rowIndx: 2, dataIndx: 'age', cls: 'pq-yellow'} );
-
dir is my var for getRowData.
I used the API to add the class. That worked.
Thanks again!