We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Weird Behavior On Data Save

Thread ID:





130967 Jun 14,2017 06:03 AM UTC Jun 14,2017 12:02 PM UTC ASP.NET MVC 1
Tags: TreeView
Asked On June 14, 2017 06:03 AM UTC


Here is my treeview initially:

Then I go and add and item to the root: (and it can be aywhere, the point is a change is being made)

And it looks like this:

I renamed the last item to Item99, as it was named Item1.

Anyway, after I save the treeview data, here is what I get:

The treeview data is all over the place after an edit. It saves the data correctly only after the very first time the tree is built - when there is nothing but a root to begin with.

Here is how I save this data and the consequesnt updates:

                function() {
                    var treeobj = $("#treeView").data("ejTreeView");
                    var jsonData = treeobj.getTreeData();
                    var dataToSend = JSON.stringify(jsonData);
                    -- ajaxCall

The ajax call is not important, even when I look at the dataToSend variable, I see that the nodes and the updated data stringis all over the place. The server side is a simple, 'save this string to the database' one.

I want to capture the whole treeview source. Is there a method other than getTreeData()? So, what am I missing? 

Thank you for your help.

Karthik Ravichandran [Syncfusion]
Replied On June 14, 2017 12:02 PM UTC

Hi Syntax, 
Thanks for contacting Syncfusion support. 
We have checked your query and not able to reproduce the reported issue in our side with the provided information.  
For your reference, we have attached the sample below to showcase treeview working properly in our side. 
If you still facing the same issue, please revert the sample based on your application to reproduce the issue in our end. This will help us to provide the solution at earliest. 
Karthik R 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon