Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to make SmartGWT TreeGrid reparent selectively allowed depending on nodes

    I have the following data in a SmartGWT TreeGrid object.
    Code:
    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)?

    #2
    In your case probably easiest is to addFolderDropHandler() and do your check there. You can event.cancel() to stop the event if it is invalid.

    Comment

    Working...
    X