I got a modelitem in C# like this:
public class ProjectDashBoardModel
{
public decimal Budget { get; set; }
public decimal Amount { get; set; }
public decimal Balance { get; set; }
public decimal Tax { get; set; }
public decimal Money1 { get; set; }
public decimal Money2 { get; set; }
public decimal Balance_2 { get; set; }
public decimal Balance_3 { get; set; }
}
public class ProjectDashboard
{
public Guid Id { get; set; }
public string ProjectLogo { get; set; }
public string LastMutatedBy { get; set; }
public DateTime LastMutatedDate { get; set; }
public List<ProjectDashBoardModel> ProjectModelList { get; set; }
}
And this is my code of my datasource:
vm.dataTotal = data.projectModelList;
I want to have all the properties the sum of it
I already tried something like this but no succes
vm.dataTotal = data.projectModelList(function () {
{field: "budget", aggregate: "sum"}
});
I already have this list in a kendo grid. Now I want the sum of the budget in the grid into a new datasource so I can bind it with a kendo bar chart.
How can I get all the sum of the properties into vm.dataTotal?
Kind regards