SMART datagrid v.1 > Examples

[ grids ver.1.3.7]   Back  Forward

Tree Row Footer  Example
no-lite

通过使用树视图的treeOptions和各个列的groupFooter,可以分别为各个树行级别显示页脚。 下列树视图中,通过将footerLevels指定为"*",在非Leaf的所有级别,显示各个行的页脚。 

Tree - 1
rows

通过在TreeOptions.footerLevels指定明确的级别为数组或指定TreeOptions.footerDisplayCallback回调函数, 可以用更复杂的逻辑,指定显示Footer的行。 

只在1级别显示页脚。 

Code -1
    treeMain.setTreeOptions({
        /** footerDisplayCallback将会优先。*/
        footerDisplayCallback: null, 
        footerLevels: [1]
    });

只在1级别显示页脚。 

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

通过指定TreeOptions.summaryScoperowSummaryScope, 可以在计算显示在树视图的页脚或各个树行的页脚单元格的合计时,指定包含在计算的行的范围。 

Tree Scope:
Row Scope:
Tree - 2
rows

查看源代码 JSP 

See Also
TreeView.treeOptions
TreeOptions.footerLevels
TreeOptions.footerDisplayCallback
TreeOptions.footerStyles
GridColumn.groupFooter
TreeOptions.summaryScope
TreeOptions.rowSummaryScope
树概述
TreeView
TreeDataSet
Examples
Hello Tree
树页脚图表