How to get the Parent RowId

I have a TreeGrid in the Page, I am selecting the nodes available in that Tree, I want the Parent RowId of the Selected Node.

You can try to use the following approach:

    var id = grid.getSelectedId();
    var parent_id = grid.getParentId(id);