Access Child Nodes of the Tree Grid.

I’ve  Tree Grid, If I select the Parent Node I want to access the Child Node Values of the selected Parent Node. 

getAllSubItems can be used to access list of child items IDs

var ids=grid.getAllSubItems(parentId).split(",")

for (var i=0; i<ids.length; i++)
    alert(grid.cells(ids[i],0).getValue());