I have a grid where I add a row. When a certain cell has data entered for 1st time and it’s celleditend event is triggered, I want to get that value and do a calculation. But when the call to getcellvalue is made, the returned value is empty. Only when another cell is changed, then the call to getcellvalue will return the expected value.
$(“#jqxgrid”).on(‘cellendedit’, function (event) {
var args = event.args;
var column = args.datafield;
if( column == ‘total’ )
{
myCalc(args.rowindex);
}
}
function myCalc(rowindex)
{
var Total = $(“#jqxgrid”).jqxGrid(‘getcellvalue’, rowindex, ‘total’);
if( Total > 0 )
{
newTotal = Total * 12;
}
$(“#jqxgrid”).jqxGrid(‘setcellvalue’, rowindex, ‘total’, newTotal);
}