O'Reilly logo

Ext JS 4 Web Application Development Cookbook by Stuart Ashworth, Andrew Duncan

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

Creating summary rows aggregating the grid's data

It is often useful to summarize data that is displayed in a grid. For example, you may wish to display the number of rows, sum the values in a column, or calculate the average (mean) for a column.

Ext JS 4 provides a useful feature for grids to allow us to display a summary row in the last row or, if it is a grouped grid, in the last row of each group. The Ext.grid.feature.Summary and Ext.grid.feature.GroupingSummary classes provide the tools required to do so:

Creating summary rows aggregating the grid's data

This recipe will demonstrate how to add a summary row to your grid and perform custom rendering on the value.

Getting ready

We are going to ...

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