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

commitchanges and serverside

1 Answer 114 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
egbert heuvelman
Top achievements
Rank 1
egbert heuvelman asked on 07 Jul 2008, 10:01 AM
hi all,

i am developing a page with a treeview where people can add and delete nodes clientside. My idea was to do this with trackchanges and commitchanges at each action of the user, WITHOUT going to the server at that point.
So if an user adds 2 nodes, the server does not know this at the moment.

I will only go to the server when the user chooses for a SAVE, this happens with a button. But.... does the button have to callback the treeview from the server to the client as well? Cause if i do not do this, i will get an index out of bounds the second time i press the SAVE button. (or when i add nodes, nodes get added each time i have a postback to the server).

What i want is that i can do changes at the client, and commit them to the server at the time the user chooses to save the data. BUT! i do not need / want to have to callback the data from the server back to the client, cause i allready know 100% sure my client state is the same as on the server.

I think above has something to do with the client state? Without a callback of the treeview from server to client, this is not emptied, but it is applied to the server (at poostback) by the clientside call commitchanges?

Cheers and thx,

1 Answer, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 08 Jul 2008, 12:00 PM
Hi,

I don't think I am able to understand your scenario clearly. The TreeView does not postback when you call commitChanges() on the client-side. Calling track/commitChanges only indicates that you want changes between the two calls to be recorded and sent to the server on the next postback.

This postback may be initiated from any control on the page - for example a Save button. When the postback occurs, the recorded changes are sent to the server.

I'm am probably missing something here. If you can provide some more details about the scenario you are trying to achieve, we will do our best to help you implement it. Also, if you have a sample project, you can open a support ticket and send it to us so we can provide a more precise answer.

Regards,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
egbert heuvelman
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Share this question
or