Hello friend I had a similar problem, I wanted a checkbox column if it was true to take the value of another column to add a total here I leave my code:
COLUMN SUM()
{ text: ‘Impuesto’, datafield: ‘Impuesto’, width: 110, align: ‘center’, cellsalign: ‘center’, editable: false , //aggregates: [‘sum’] },
aggregates: [{ ‘<b>Total: </b>’:
function (aggregatedValue, currentValue, column, record) {
var total = 0;
if(record[‘Aplicar’] == 1){
total = parseFloat(record[‘Impuesto’]);
}
return aggregatedValue + total;
}
}]
},
COLUMN CONDITION:
{ text: ‘Aplicar’, datafield: ‘Aplicar’, width: 70, columntype: ‘checkbox’, align: ‘center’, cellsalign: ‘center’, cellsrenderer: columncheckboxRenderer }
var columncheckboxRenderer = function (value) {
$(“#jqxgridImpuestos”).jqxGrid(‘endupdate’);
}