MirlvsMaximvs
MirlvsMaximvs

Reputation: 1483

How can I add a treenode to treeview using javascript

I want to manipulate the treeview nodes(add node, add child node, delete node,and move up,down) from client side only and then do postback to compare changes and save to database. When I add the nodes to the tree I set the nodes.selectedacction=none

Anybody knows how I can achive this using jquery or any for free control

Upvotes: 0

Views: 476

Answers (1)

Chamika Sandamal
Chamika Sandamal

Reputation: 24302

Adding, deleting items to the treeview using javascript is not a big deal. But since you want to access the values in the backend, it is not a simple task. My best suggestion is you can have a JSON object for the treeview and access it using JavaScript and then generate the tree. then instead of bostback, you can pass the generated JSON to backend using ajax request. then you can compare two objects.

Upvotes: 1

Related Questions