 <p>I have never used treegrid, from the sample provided by Oleg it seems to be that in grid data there is an item <code>isLeaf</code>. I think you have to check for <code>rd.isLeaf</code> <a href="http://ok-soft-gmbh.com/jqGrid/LocalAdjacencyTree14.htm" rel="nofollow">See the demo here</a> the data used there is (first row) </p> <pre><code>{id: "1", name: "Cash", num: "100", debit: "400.00", credit: "250.00", balance: "150.00", enbl: "1", level: "0", parent: "null", isLeaf: false, expanded: true, loaded: true, icon: "ui-icon-carat-1-e,ui-icon-carat-1-s"}, </code></pre>