r').each(function(){
  if ($(this).treegrid('getDepth')<2){
	$(this).treegrid('expand');
  }
});</code></pre>
                    </td>
                <tr>
                    <td>isNode</td>
                    <td>return true if element is node</td>
                    <td>
                        <pre><code class="javascript">
  $('#tree-1').find('tr').each(function() {
    if ($(this).treegrid("isNode")) {
      //Do something
    }
  });
</code></pre>
                    </td>
                </tr>   