SMART datagrid v.1 > Examples

[ grids ver.1.3.7]   Back  Forward

Tree Row Footer  Example
no-lite

You can use treeOptions of the tree view and groupFooter of each column to display the footer of each tree row level. In the tree view below, it specifies footerLevels as "*" to display the footer of each row in all levels except Leaf. 

Tree - 1
rows

By specifying the explicit level as an array in TreeOptions.footerLevels or specifying TreeOptions.footerDisplayCallback callback function, you can specify the row which will display Footer in more complicated logic. 

Display Footer only in 1 level row. 

Code -1
    treeMain.setTreeOptions({
        /** footerDisplayCallback takes precedence. */
        footerDisplayCallback: null, 
        footerLevels: [1]
    });

Display Footer only in 1 level row. 

Code -2
    treeMain.setTreeOptions({
        footerDisplayCallback: function (row) {
            return row.level() == 2;
        }
    });
Summary Scope

You can specify TreeOptions.summaryScope and rowSummaryScope to specify the range of the rows contained in the calculation when calculate the sum displayed in the tree view footer or the footer cell of each tree row. 

Tree Scope:
Row Scope:
Tree - 2
rows

View Source JSP 

See Also
TreeView.treeOptions
TreeOptions.footerLevels
TreeOptions.footerDisplayCallback
TreeOptions.footerStyles
GridColumn.groupFooter
TreeOptions.summaryScope
TreeOptions.rowSummaryScope
Tree Overview
TreeView
TreeDataSet
Examples
Hello Tree
Tree Footer Chart