开发者

How to make SmartGWT TreeGrid reparent selectively allowed depending on nodes

开发者 https://www.devze.com 2023-01-07 07:12 出处:网络
I have the following data in a SmartGWT TreeGrid object. Home -Room 1 开发者_Python百科 |-Room 2

I have the following data in a SmartGWT TreeGrid object.

Home
 |-Room 1
开发者_Python百科 |-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)?

0

精彩评论

暂无评论...
验证码 换一张
取 消