SMART datagrid v.1 > Classes > TreeDataRow

Back  Forward

DataLudi.TreeDataRow.children  property

It returns child rows just below as array. 

If no child rows, it will return an empty array. You can get the list of all descendant rows by getDescendants

Getter
function children(): Array
Code -1
    $('#checkSum').click(function () {
        var row = tree.focusedRow();
        if (row) {
            var sum = 0;
            var rows = row.children();
            for (var i = rows.length; i--;) {
                sum += rows[i].getData('amount');
            }
            if (sum > 10000) {
                alert('Too large !');
            }
        }
    });
See Also
count
getDescendants
TreeDataSet
Tree Overview
Examples
Hello Tree
Tree Data Set