Next
Update
Prev
Expand All
Close All

This sample demonstrates how to group data and to create a sum.

You can place the summary row at the top or bottom of the group or insert the summary row into the grouping rows. Try to click on the "Expand All", "Close All" buttons to check the data.

...
<dataProvider>
  <GroupingCollection source="{$gridData}" >
    <Grouping>
      <GroupingField name="Year" >
        <summaries>
          <SummaryRow summaryPlacement="group" >
           ...
        </summaries>
      </GroupingField>
    <Grouping/>
  <GroupingCollection/>
</dataProvider>
...

<SummaryRow>

summaryPlacement This attribute is to set the location of the summary row. ("first", "last", "group". default : "last")

<SummaryField>

dataField This attribute is to set the name of field which is to be summed.
label This attribute is to set the name of field in which the sum is to be stored. The default value is "dataField".
summaryOperation This attribute is to set the sum operation. ("SUM","MIN","MAX","AVG","COUNT". default : "SUM")

© 2017 KoolChart. All rights reserved.