I have a requirement to show total of column value on footer of the grid. I have created method to calculate total for each column and calling the same method on grid data bound.
I have applied paging in kendo grid, so while changing page the total value also getting changed, means the total in footer showing only for particular page records.
But i have requirement to show total value of column for all records in footer even if paging is there.
function CalculateTotal() {
var currentDataItem = $("#gridLiabilitySchedules").data("kendoGrid").dataItem($(this).closest("tr"));
for (var i = 0; i < grid.dataSource._data.length; i++) {
totalOriginalBudget = totalOriginalBudget + grid.dataSource._data[i]["OriginalBudget"];
totalAwardValue = totalAwardValue + grid.dataSource._data[i]["AwardValue"];
totalBuyingGainLoss = totalBuyingGainLoss + grid.dataSource._data[i]["BuyingGainLoss"];
totalCurrentBudget = totalCurrentBudget + grid.dataSource._data[i]["CurrentBudget"];}}
function LiabilitySchedulesGrid_DataBound(e) {
$('#hdnLiabilitySchedulesremovedata').val(false);
CalculateTotal();
$('#hdnLiabilitySchedulesGridValCount').val($('#gridLiabilitySchedules').data('kendoGrid').dataSource.total() == 0 ? "" : "1");
}
Please provide me a solution to show total of column value for all records in footer of grid with paging.
Thanks