jQWidgets Forums

jQuery UI Widgets Forums Grid change the background-color cell when a cell changes its value Reply To: change the background-color cell when a cell changes its value


portab
Participant

edit jqxrid.js and replace tex :

role=”gridcell”

for:

id=”C’+y+w+'” role=”gridcell”

Appears twice.

In your page paste this code:

$(“#jqxgrid”).on(‘cellvaluechanged’, function (event){
var colindex = $(‘#jqxgrid’).jqxGrid(‘getcolumnindex’, datafield);
var args = event.args;
var datafield = event.args.datafield;
var rowBoundIndex = args.rowindex;
var value = args.newvalue;
var oldvalue = args.oldvalue;
if(oldvalue != value ) {
document.getElementById(“C”+rowBoundIndex+colindex).style.backgroundColor = ‘green’;
}
});

The method getcolumnindex requires jqxgrid.columnsreorder.js
Regards.