Tuesday, 12 October 2021

kendo grid sum of the column

 make sme or aggarate of the particular column look at this Link

look at this data



import { process, State, aggregateBy, AggregateResult, AggregateDescriptor } from "@progress/kendo-data-query"; on constructor top
public aggregates: AggregateDescriptor[] = [
  { field: "units", aggregate: "sum" },];
 filed name wich u want to sum from grid

then pass data to this function
  const count= aggregateBy(this.array3, this.aggregates);
     
        this.totalOldCrtSAN=count.units.sum;

this.array3 is gird data and second step is final result.

No comments:

Post a Comment

remove duplicates in an sorted array

  using System; public class HelloWorld {          public static void Main(string[] args)     {         int[] ar={2,2,3,3,4,6,6};          C...