This is a migrated thread and some comments may be shown as answers.

Better Drag\Drop visualization

2 Answers 27 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 2
Veteran
Steve asked on 11 Sep 2011, 04:55 AM
I was wondering if you guys could jQuery up a better visualization for drag\drop...Sitefinity has an awesome widget drag\drop visualization (as an example)...so instead of the row with an arrow following the mouse, the place in the tree in which it will place itself contains a placeholder (like dashed border)

Does that make sense?...so we can see in realtime where it'll appear

2 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 13 Sep 2011, 03:35 PM
Hello Steve,

In RadTreeList, we cannot successfully determine the place where the reordered item will appear. There are many factors to consider, that make the destination of the dragged items indeterminate:

1. Sorting. RadTreeList is a databound control and item order is based on what gets passed as a data source and what sorting is applied to the control. We cannot determine the final destination of the item based on where it is dropped. We do not know if this item is going to get placed there, or will appear above or below after databinding.

2. Paging. As a hierarchical and, at the same time pageable, control, item reordering changes the visibility of the items on the current page. This makes the final order and visibility of the items unpredictable by the time of the drag-and-drop action.

3. Lack of API to specify position when updating data. When implementing item reordering in a databound, hierarchical control, what can you really change? The only thing that you can update is the foreign key of the dragged records. This is what determines your hierarchical order and this is the only data that your hierarchical tree is based on. Being able to change only the foreign key, you are only ever sure about 1 result - that the dragged items will be assigned as children of the destination item. In what order? This is beyond the scope of RadTreeList.

As a final note, let me argue that comparing a data-bound control  with an unbound control in terms of item reordering is incorrect. An unbound control like a TreeView is always richer in terms reordering capabilities, because the control itself specifies the order of appearance of its items. This is not the case with a data-bound control such as RadTreeList, where item order is not determined by the control, but externally enforced - through the natural order of the data and the sorting expressions that are to be applied.

For all the above mentioned reasons, we cannot reliably provide an API (or a visual interface) for targeting a specific item position in the hierarchical item tree in RadTreeList.

Greetings,
Veli
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Steve
Top achievements
Rank 2
Veteran
answered on 22 Sep 2011, 04:47 AM
Yeah, no I realize there's no way to PUT it somewhere :)

But this is what I mean: http://screencast.com/t/aZ8XL1RmcT
(so I couldn't link it to the drag, so I just did it on hover as a test)

It's more of a "Here's the parent you're dropping it on" I guess
Tags
TreeList
Asked by
Steve
Top achievements
Rank 2
Veteran
Answers by
Veli
Telerik team
Steve
Top achievements
Rank 2
Veteran
Share this question
or