Angular Datatable >> 如何获取总行数和所有金额值的总和。需要获取表的总行数。我尝试使用下表并仅获取第一页记录。请建议我如何获取get total number of records across all page以及需要获取sum of the total records values. 我尝试使用下面的代码,
getTotalAmount(){
let amountValues="";
let rowCount = $("table > tbody").children().length;
console.log("rowCount ::: " + rowCount);
for(var i=0;i<rowCount;i++){
if(this.persons[i].firstName === 'Superman' && this.persons[i].index != '')
console.log(this.persons[i].index);
amountValues += parseFloat(this.persons[i].enteredDebit);
}
console.log("amountValues >>>>>>>" + amountValues);
}
DIEA
相关分类