O'Reilly logo

Ext.NET Web Application Development by Anup Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Column summaries

You can also make the grid calculate totals for you. To do this we use another feature of the GridPanel—Summary. At its simplest, it involves the following two steps:

  1. Declare the feature.
  2. Set up the columns to be summarizable columns, if needed.

To declare the feature, we can extend our earlier example with the following code:

<Features>
    <ext:GridFilters Local="true">
        <!-- Filter options go here -->
    </ext:GridFilters>
    <ext:Grouping />
    <ext:Summary />
</Features>

Next, we need to configure each column to support summarizing. Until now, we have used the Column class or <ext:Column /> to define each column. Now we will use a subclass, SummaryColumn or <ext:SummaryColumn />. Let's look at this, a few columns at a time:

<ext:RowNumbererColumn ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required