ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: omerix on December 07, 2018, 02:46:39 pm
-
Hello,
I want to paint row with addClass when I do "rowClick" but it doesn't work.
The codes I tried;
1) $('Pq1117Recete').pqGrid('addClass', {rowIndx: ui.rowIndx,cls: 'pq-striped-error'});
Not working, No Error
2) this.pqGrid('addClass', {rowIndx: ui.rowIndx,cls: 'pq-striped-error'});
Not working.
Error:Uncaught TypeError: this.pqGrid is not a function
3) grid.pqGrid('addClass', {rowIndx: ui.rowIndx,cls: 'pq-striped-error'});
Error: Uncaught TypeError: grid.pqGrid is not a function
pqgrid.css
.pq-striped-error {
background-color:rgba(245, 132, 132, 1.0) !important;
color:#ffffff !important;
}
.pq-striped-ok {
background-color:rgba(169, 208, 142, 1.0) !important;
border-color:rgba(169, 208, 142, 1.0) !important;
color:#000000 !important;
}
http://jsfiddle.net/omerx/0wgs1orb/141/
-
pqGrid is jQuery method. addClass is a method of pqgrid instance.
rowClick: function(evt, ui){
this.addClass({rowIndx: ui.rowIndx,cls: 'pq-striped-error'});
}
http://jsfiddle.net/vw3t2zba/
-
Thanks. Worked.
pqGrid is jQuery method. addClass is a method of pqgrid instance.
rowClick: function(evt, ui){
this.addClass({rowIndx: ui.rowIndx,cls: 'pq-striped-error'});
}
http://jsfiddle.net/vw3t2zba/