SMART datagrid v1.4 > Classes > GridBase

Back  Forward

DataLudi.GridBase.getAllRows  method

부모 collapsed 상태인 감춰진 행들까지 포함한 모든 행들을 모아서 배열로 반환한다. 

행그룹핑된 그리드뷰나, 트리뷰에서 GridBase.rowCountgetRow는 감춰진 행들을 포함하지 않는다. 감춰진 행들을 포함한 모든 행에 접근하는 데 사용할 수 있다. 

function getAllRows (): [GridRow];
Returns
[GridRow]
Code -1
    $('#calc').click(function () {
        var sum = 0;
        var rows = grid.getAllRows();
        
        for (var i = 0; i < rows.length; i++) {
            var row = rows[i];
            if (row.dataIndex() >= 0) {
                // 데이터필드명으로 값을 가져온다.
                sum += row.getData('SALARY');
            }
        }
        
        $('#sum').val(sum);
    });
See Also
visitRows
GridRow
GridRow.parent
collapsed
GridBase.rowCount
GridBase.getRow
Examples
Row Model 다루기
Row Grouping