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

Order of Child Items after drag /drop persistence

2 Answers 94 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Rick Nguyen
Top achievements
Rank 1
Rick Nguyen asked on 01 Jul 2014, 05:38 AM
Hy,

I am using Kendo Tree View.

I am doing drag/drop and I need to persist the info to the db. 
Looking via the Kendo Plugin in Chrome.. I see  the  "4"  which was originally "1" after the move.  ( image attached)


Example: also see image attached.
4: Object{13}  //see via Kendo Plugin

I was thinking I could get this  value  for the children under the parent where the items moved (example  0-4 ) and I can pair up the actual id with this index to figure out the sort order for children for persistence.

Is there a way ... like in Grid which has index..... we can do the same in Treeview ?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 03 Jul 2014, 06:34 AM
Hello Rick,

Unfortunately I couldn't understand what you need.

What value are you trying to get? Also what is this grid index that you mention? The grid widget doesn't have an index method.

If you want to get the data item to which a tree node is bound you can use the dataItem method.

Regards,
Atanas Korchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Rick Nguyen
Top achievements
Rank 1
answered on 08 Jul 2014, 03:24 AM
Hy,
I found the solution.

But the Object{x} I was noticing was the KendoUi deguging view in Chrome.

Basically I was trying to see if the API had a way to give an indexed item array of all child items under a parent when you drag and drop an item  (over  parent ,,,after or before or over the child item).

Kendo treeview has the  dropPosition  (over,before,after) and Target info which I was able to use to figure out where the dropped item need to be placed....  on the backend ..for persistence.

thanks,

Tags
TreeView
Asked by
Rick Nguyen
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Rick Nguyen
Top achievements
Rank 1
Share this question
or