Common grouping code is as follows:
// Set the group information FarPoint. web. spread. sheetView sv = this. fpSpread1.ActiveSheetView; // sets whether the header can be grouped by double-clicking. // sv. allowGroup = true; TPD = new GroupDataModel (sv. dataModel); Session ["dataModel"] = TPD; sv. dataModel = TPD; FarPoint. web. spread. sortInfo [] sort = new FarPoint. web. spread. sortInfo [1]; // you can specify the grouping column and sorting method (1st columns are grouped by default, and the number of columns starts from 0). sort [0] = new FarPoint. web. spread. sortInfo (1, true); TPD. group (sort); // hide the bottom of the Group (usually used for aggregate and so on) // FarPoint. web. spread. model. group group = new Group (TPD, (FarPoint. web. spread. model. group. groups [0], 0, false); // GroupFooter groupfooter = new GroupFooter (group); // FpSpread1.Sheets [0]. groupFooterVisible = true; // set ColumnFooter. The formula for GroupFooter column 1st is Sum, which is used to calculate the addition of all cells in column 5th. // this. fpSpread1.ActiveSheetView. columns [0]. aggregationType = FarPoint. web. spread. model. aggregationType. sum;
This article from the "love dead lonely man" blog, please be sure to keep this source http://chcchb.blog.51cto.com/3592607/1251400