Hi,
I upgraded from 2.4.1 to 3.1.0. After upgrade, one feature is not working in upgrade which used to work in earlier version.
I had a column with editor as select dropdown and render as to add/remove class. When user changes options in that dropdown, row css would be changed accordingly.
Here is my column I had, which was working in 2.4.1 version:
editor : {
type: 'select',
labelIndx:'status',
valueIndx:'statusCd',
options: function (ui) {
styleStatus = ui.rowData.styleStatus;
if (styleStatus) {
return statusList[styleStatus];
}
return [];
}
},
render : function (ui) {
var cellData = ui.cellData;
var $grid = $(this);
if (ui.rowData.statusCd == 'A'){
$grid.pqGrid("removeClass", {rowIndx: ui.rowIndx, cls: 'pq-row-red' }); $grid.pqGrid("removeClass", {rowIndx: ui.rowIndx, cls: 'pq-row-grey' });
$grid.pqGrid("addClass", {rowIndx: ui.rowIndx, cls: 'pq-row-white' });
}
else if(ui.rowData.statusCd == 'H'){
$grid.pqGrid("removeClass", {rowIndx: ui.rowIndx, cls: 'pq-row-white' });
$grid.pqGrid("removeClass", {rowIndx: ui.rowIndx, cls: 'pq-row-grey' });
$grid.pqGrid("addClass", { rowIndx: ui.rowIndx,dataIndx:null, cls: 'pq-row-red' });
}else if(ui.rowData.statusCd == 'C'){
$grid.pqGrid("removeClass", {rowIndx: ui.rowIndx, cls: 'pq-row-white' });
$grid.pqGrid("removeClass", {rowIndx: ui.rowIndx, cls: 'pq-row-red' });
$grid.pqGrid("addClass", { rowIndx: ui.rowIndx, cls: 'pq-row-grey' });
}
return cellData;
}
and now in 3.1.0, I am having below javascript error:
TypeError: a is undefined
pqgrid.min.js
Line 57
Col 373