Hi,
I'm trying to add a node to a tree that has loadOnDemand: true, on client-side. I can't find anything in the API that allows adding a node, and I can't seem to add it to the data source and re-bind since the data source is loaded on demand. Is there perhaps a way to modify the current set of loaded nodes?
For example, take the tree below, given that the 100/200/300 nodes are loaded initially, and then the 010/020 nodes and 001/002/003 nodes are loaded on demand when their parent is expanded. If I want to add a node "Node 004" as another child of Node 010 (it would be a sibling to nodes 001/002/003), is that possible on client-side?
Thanks,-Jared
Just wanted to know if the above issue was resolved. If yes, could you post a sample here.
Also, can we use dynamic loading in an .aspx page using normal ASP.NET web service, or is OData service required in this case.
Thanks a lot.
Hi Jared,
It would be great if you could do that!
Thanks!
Hi Konstantin,
Unfortunately, the default MVC 3 project is too large when zipped, even without my code and the igTree code. When I tried to upload the entire project the site gave me an error specifying that 200kB was the maximum file size it would allow to upload. Will try to find some time today to host the solution online somewhere so you can access it that way.
Hey Jared,
You can zip your project and attach everything this way.
Thanks,
Konstantin
Yes, have attached some sample code for you to look at, details below. Also, in our real application we're dealing with many more than 2k nodes in the tree if we download the entire hierarchy at once. I've actually exceeded default size limits for the JSON serializer when returning the whole tree before, so that's not really a good option. Using loadOnDemand is basically a must for us :-)
-----
Due to file size limitations I've attached only the files I edited when creating a new "ASP.NET MVC3 Web Application" project (using C# language, Razor view engine, HTML5 semantic markup, and the Intranet Application template). The 4 files attached should be:
You'll want to update the script references in Index.cshtml to point towards the right locations in your project for the ig scripts/css and jQueryUI script. You'll also want to double check the namespaces and/or usings on the cs files to make sure they match whatever you name the project. (I named mine "igTreeSample").
Let me know if you have trouble getting it working in a new project or if you find anything that will work for me.
Thanks!-Jared