dhtmlxTree: how to get the checkbox id's multi line rows in

When I select multiple check boxes and press the get selected item’s I�m getting alert box and all ids in single row.

There is any way to get each parent id name and child ids in different rows?

When I select multiple check boxes and press the get selected item’s
Tree has two functions
    to get selected items   -   tree.getSelectedItemId()
    to get checked items   -   tree.getAllChecked();

both functions returns just a list of IDs, without their place in hierachy, you can restore necessary info by
    grid.getParentId(id);
    grid.getLevel(id);