SMART datagrid v1.4 > Examples

[ grids ver.1.3.7]   Back  Forward

Tree Row Footer  Example
no-lite

트리뷰의 treeOptions와 각 컬럼의 groupFooter를 이용해서 트리행 레벨별로 Footer를 표시할 수 있다. 아래 트리뷰에서는 footerLevels"*"로 지정해서 Leaf가 아닌 모든 레벨에서 행별 Footer를 표시하고 있다. 

Tree - 1
rows

TreeOptions.footerLevels에 명시적인 레벨을 배열로 지정하거나, TreeOptions.footerDisplayCallback 콜백 함수를 지정해서 보다 복잡한 로직으로 Footer를 표시할 행을 지정할 수 있다. 

1레벨 행에만 Footer 표시. 

Code -1
    treeMain.setTreeOptions({
        /** footerDisplayCallback이 우선한다 */
        footerDisplayCallback: null, 
        footerLevels: [1]
    });

1레벨 행에만 Footer 표시. 

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
트리 시작하기
Tree Footer Chart