Hi Team,
I am trying to add column values to the Total column in DataTable, but the total is not getting decimal value. It should be same as below Total amount.
Below is the code.
fd.control("DataTable1").columns[6].editable = function () {
return false;
};
fd.control("DataTable1").$on('change', function(value) {
var hoursTotal = 0.0;
if (value) {
// go through each row one by one
for (var i = 0; i < value.length; i++) {
var dayHours=parseFloat(value[i].Mon +value[i].Tues +value[i].Wed + value[i].Thurs + value[i].Fri);
// calculate total for the row
value[i].set('Total',dayHours);
if (value[i].Total) {
hoursTotal += parseFloat(value[i].Total);
}
}
}
fd.field('NoHrs').value = hoursTotal;
});
Thank you in advance.