Hello,
Is there a way i can override default tree list drag and drop event?
I would need similar functionality as tree view where i can order the rows and insert before or after any row.
Any help would be appreciated.
Thanks in advance!
5 Answers, 1 is accepted
The TreeList widget does not support reordering out of the box. The behavior you are after could be implemented though, by subscribing to the widget's drag and drop events and doing the reordering manually if the conditions are met.
Regards,
Alexander Popov
Telerik by Progress
Hello,
Thanks for the reply.
In Treeview, there is a property called "dropPosition" which i can set in drop / dragend event.
In TreeList, there is a property called "position" which i can set in drop / dragend event. It is not having any impact on setting the position property to value "before" / "after".
Can you please help me with a code snippet on how i can achieve the same in tree list?
Thanks in advance!
Hello,
Thanks for the reply.
In Tree view, the dragend and drop event have a property called "dropPosition".
Where as in tree list, the same events have a property called "position". I tried setting the position value to "before" / "after". It has no impact.
Can you please help me with the code snippet on how i can achieve the same in tree list?
I also see, there is a cue line in tree view, when i drag rows. They indicate the position where i can insert the dragged row. How can i have the same cue line in tree list?
Attached is the snapshot of the line in tree view.
Thanks for the reply.
In Tree view, the dragend and drop event have a property called "dropPosition".
Where as in tree list, the same events have a property called "position". I tried setting the position value to "before" / "after". It has no impact.
Can you please help me with the code snippet on how i can achieve the same in tree list?
I also see, there is a cue line in tree view, when i drag rows. They indicate the position where i can insert the dragged row. How can i have the same cue line in tree list?
Attached is the snapshot of the line.
As mentioned previously, reordering is not supported out of the box. This means that deciding how and when to show the cue and the before/after cursor icons should be part of the custom implementation. Changing the order of the items can be achieved using the DataSource's API methods.
Regards,
Alexander Popov
Telerik by Progress