js/jquery.treegrid.js
function() {
            if ($(this).treegrid('isNode')) {
                var parentNode = $(this).treegrid('getParentNode');
                if (parentNode === null) {
                    if ($(this).treegrid('getNodeId') === $(this).treegrid('getRootNodes').first().treegrid('getNodeId')) {
                        return true;
                    }
                } else {
                    if ($(this).treegrid('getNodeId') === parentNode.treegrid('getChildNodes').first().treegrid('getNodeId')) {
                        return true;
                    }
                }
            }
            return false;
        }
function() {
            if ($(this).treegrid('isNode')) {
                var parentNode = $(this).treegrid('getParentNode');
                if (parentNode === null) {
                    if ($(this).treegrid('getNodeId') === $(this).treegrid('getRootNodes').first().treegrid('getNodeId')) {
                        return true;
                    }
                } else {
                    if ($(this).treegrid('getNodeId') === parentNode.treegrid('getChildNodes').first().treegrid('getNodeId')) {
                        return true;
                    }
                }
            }
            return false;
        }
function ( ) { if ( $ ( this ) . treegrid ( 'isNode' ) ) { var parentNode = $ ( this ) . treegrid ( 'getParentNode' ) ; if ( parentNode === null ) { if ( $ ( this ) . treegrid ( 'getNodeId' ) === $ ( this ) . treegrid ( 'getRootNodes' ) . first ( ) . treegrid ( 'getNodeId' ) ) { return true ; } } else { if ( $ ( this ) . treegrid ( 'getNodeId' ) === parentNode . treegrid ( 'getChildNodes' ) . first ( ) . treegrid ( 'getNodeId' ) ) { return true ; } } } return false ; }
Method return true if node first in branch

@returns {Boolean}
Method return true if node first in branch