views:

25

answers:

0

I have the following data in a SmartGWT TreeGrid object.

Home
 |-Room 1
 |-Room 2
    |-Table
    |-Chair

Reparenting is allowed by calling treeGrid.setCanReparentNodes(true);

I want to allow selectiv reparenting only: for example, it should be possible to move (drag&drop) the Table to Room 1, but it should not be possible to move the Room 1 into Room2 or the Chair into Home.

How can I selectively allow reparenting depending on the node type (or a node's attribute)?