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

TreeView - ClientChanges collection empty for Server Side Load on Demand Nodes - not Persisting JavaScript changes on Postback

1 Answer 41 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 24 Apr 2019, 01:40 AM

I suspect this is a limitation in functionality - is the RadTreeView meant to persist changes to Nodes dynamically added on Demand in Server Side AJAX (out of the box)? I have tried with ViewStateMode="Enabled" and PersistLoadOnDemandNodes="true" to no avail.

It seems that client side changes made in JavaScript (between client side trackchanges() and commitchanges() calls) aren't recognized when the nodes are dynamically loaded with this server side event:

protected void RadTreeView1_NodeExpand(object sender, RadTreeNodeEventArgs e)

When the page is posted back with a Save button, and (for example) nodes are removed in javascript - the changes seem to disappear on the server side. I suspect it's because the ViewState in the posted back control and javascript client changes are out of sync. They exist in the client side javascript ._log property until the commitchanges() is called. Then the changes all disappear and don't exist in the server side ClientChanges property on postback. None of the the provided demonstration examples seem to show support for updates, just read only load on demand scenarios. 

 

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 26 Apr 2019, 07:27 PM
Hi David,

Could you please show us more details about the scenario? It would be great if you could share the markup and code behind, or share the aspx page so that we can take a look and see how things are built and configured.

Based on that we would be able to get a better understanding on the scenario and provide you with a more accurate answer.

Kind regards,
Attila Antal
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TreeView
Asked by
David
Top achievements
Rank 1
Answers by
Attila Antal
Telerik team
Share this question
or