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:
var treeobj = $("#treeView").data("ejTreeView");
var jsonData = treeobj.getTreeData();
var dataToSend = JSON.stringify(jsonData);
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?