SMART datagrid v1.4 > Classes > GridBase

Back  Forward

DataLudi.GridBase.visitRows  method

부모 collapsed 상태인 감춰진 행들까지 포함한 모든 행들에 접근할 때 사용한다. 

행그룹핑된 그리드뷰나, 트리뷰에서 GridBase.rowCountgetRow는 감춰진 행들을 포함하지 않는다. 이 메소드를 호출하면 감춰진 행들을 포함한 모든 행에 접근할 때마다 callback 함수를 호출한다. 

function visitRows (visibleOnly: boolean, dataOnly: boolean, callback: function);
Returns
Void
Parameters
visibleOnly - boolean. 기본값은 false.
표시 중인 행들만 접근.
dataOnly - boolean. 기본값은 false.
dataIndex가 0이상인 데이터행들만 접근.
callback - function.
function (row:GridRow, count:Integer, index:Integer);
Code -1
    // 모든 행들을 가져온다.
    var rows;

    $('#collectRows').click(function () {
        rows = [];
        grid.visitRows(false, false, function (row, count, i) {
            rows.push(row);
        });
    });
See Also
getAllRows
GridRow
GridRow.parent
collapsed
GridBase.rowCount
GridBase.getRow
Examples
Row Model 다루기
Row Grouping