Welcome Guest Search | Active Topics | Sign In | Register

How to enforce business rules with drag-drop in a treeview Options
Dynamic Web
Posted: Friday, October 26, 2007 5:20:35 AM
Rank: Member
Groups: Member

Joined: 10/22/2007
Posts: 18
It must be a common need to maintain a logical hierarchy (i.e. enforce business rules) while allowing drag drop for reorder in a treeview. I have tried implementing some by setting allowDrag/allowDrop on nodes programmatically and setting allowDragDrop/allowDragReordering for the component on the .aspx page, but have not yet found a solution that controls which nodes can be draggable to particular locations in the tree.

What is the popular method for implementing business rules on treeview drag/drop? Simply to allow/reject the move after it is done on the client or server side? Or Is it possible to configure a treeview for example, such that child nodes can be dragged to be reordered amongst other child nodes within the same parent, but NOT dropped inside another parent node, or such that parent nodes can be dragged to be reordered amongst siblings but NOT dropped inside one another?

Just a general standard mechanism would be sufficient as an answer here-- no need to post/analyze code at this point.
eo_support
Posted: Friday, October 26, 2007 6:57:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The TreeView offers the following client side event handlers for you to do that:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.TreeView.ClientSideOnDragBegin.html
http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.TreeView.ClientSideOnDragDrop.html
http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.TreeView.ClientSideOnDragOver.html

With this three event handlers, you can precisely control which node can be dropped where.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.