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

[Solved] How do i Save the Treeview after drag'n'drop to DB ?

1 Answer 168 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martin
Top achievements
Rank 1
Martin asked on 05 Oct 2011, 01:41 PM
I've managed to insert a TreeView onto my MVC3 view... and im raising the onNodeDropped event fine.

How do i then save the treeview 'state' (ordering, node placement) into the database ?

what properties / methods on the tree can i use ??

thanks

1 Answer, 1 is accepted

Sort by
0
Martin
Top achievements
Rank 1
answered on 06 Oct 2011, 08:55 AM
ok... so i've digged into the terrible documentation of the TreeView and found this:

function onNodeDropped(e) {
        $console
.log('OnNodeDropped :: `' + treeView().getItemText(e.item) + '` '
                                   
+ e.dropPosition +
                                   
' `' + treeView().getItemText(e.destinationItem) + '`');
   
}

so i guess i'll use Ajax to send messages to the server in a coded language... "Node1 Droped on Node2"

argh
Tags
TreeView
Asked by
Martin
Top achievements
Rank 1
Answers by
Martin
Top achievements
Rank 1
Share this question
or