3 Answers, 1 is accepted
0
Hi enzo,
What do you mean by using WebService?
Generally, Web Services are used to load Nodes on demand as described in details here - Web Service Load On Demand.
As for updating a DB, you could use the server-side events of the TreeView to perform DB manipulation when a Node is dropped, edited, expanded, clicked, etc. - Server-Side Events.
Additionally, you could execute your custom logic after certain events occur on the client using the Client-Side Events.
Finally, here are some demos you might want to look at:
All the best,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
What do you mean by using WebService?
Generally, Web Services are used to load Nodes on demand as described in details here - Web Service Load On Demand.
As for updating a DB, you could use the server-side events of the TreeView to perform DB manipulation when a Node is dropped, edited, expanded, clicked, etc. - Server-Side Events.
Additionally, you could execute your custom logic after certain events occur on the client using the Client-Side Events.
Finally, here are some demos you might want to look at:
All the best,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Puzsol
Top achievements
Rank 1
answered on 16 Jun 2008, 12:06 AM
Sorry, we can't do everything for you....
There are notes in this forum on how to refresh a node populated from the server:
rtrAudio.trackChanges();
node.get_nodes().clear();
node.set_expanded(false);
rtrAudio.commitChanges();
node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.WebService);
node.expand();
Why they counldn't implement a refresh([expand_mode]) function is beyond me.... though Javascript being what it is, I guess I could add it to the prototype myself...
As for how to communicate the changes to your database, and actually make the changes, you are on your own... at the moment I am doing a similar thing, but with folders, and I am sending a command to the server (on the appropriate actions), then refreshing the tree to the selected node (which is populated from the server, so that you can be certain that what you wanted to happen, has happened)
I'm sure there are other methods of implementing what you want.... I would be interested to hear what you ended up choosing.
Andrew
There are notes in this forum on how to refresh a node populated from the server:
rtrAudio.trackChanges();
node.get_nodes().clear();
node.set_expanded(false);
rtrAudio.commitChanges();
node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.WebService);
node.expand();
Why they counldn't implement a refresh([expand_mode]) function is beyond me.... though Javascript being what it is, I guess I could add it to the prototype myself...
As for how to communicate the changes to your database, and actually make the changes, you are on your own... at the moment I am doing a similar thing, but with folders, and I am sending a command to the server (on the appropriate actions), then refreshing the tree to the selected node (which is populated from the server, so that you can be certain that what you wanted to happen, has happened)
I'm sure there are other methods of implementing what you want.... I would be interested to hear what you ended up choosing.
Andrew
0
Hello,
Unfortunately, we do not have such an example ready. The way imagine this to work is the same as Andrew described it. You have to send commands to the server for the corresponding actions on the client. We will try to make such scenario a bit easier in the future.
Andrew, you have a good point about the refresh function. We will definitely implement it.
Sincerely yours,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Unfortunately, we do not have such an example ready. The way imagine this to work is the same as Andrew described it. You have to send commands to the server for the corresponding actions on the client. We will try to make such scenario a bit easier in the future.
Andrew, you have a good point about the refresh function. We will definitely implement it.
Sincerely yours,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center