New features in 2012 Q2 beta for treeview

3 posts, 0 answers
  1. Christopher
    Christopher avatar
    10 posts
    Member since:
    Mar 2012

    Posted 10 Jul 2012 Link to this post

    I've downloaded in the 2012 Q2 beta and the "changes" file under treeview says only:
    • Allow disabled items to be expanded / collapsed through the API
    In December 2011, there was discussion of dynamic loading capability being added to the Jan 2012 release.
    It didn't happen.
    I also saw discussion of dynamic loading of tree data being added to the march 2012 release. 
    It didn't happen.
    Based on the beta doc above, It appears that dynamic loading for treeview won't happen for the 2012 Q2  (July) release.
    Is this correct?
    I've asked about this feature before but have not had a response.
    Here's what I think would be enough for my application:
    Display the expansion triangle regardless of whether a node has children or not.
    Then there would be something for a user to click on and I could handle the event and 
    get the children from the server and populate the tree with custom javascript.
    The "don't display expansion triangle if no children" is "too clever". Please add 
    a configuration option to a tree to "disable" this "too clever" feature.

    If no response to this message (just like my other questions), I'll assume Treeview is no longer being worked on.
  2. Mark
    Mark avatar
    16 posts
    Member since:
    Apr 2012

    Posted 10 Jul 2012 Link to this post

    Hi Christopher,

    From what I've seen (and tried) they have been working on it: see http://demos.kendoui.com/beta/web/treeview/odata-binding.html and also my thread: http://www.kendoui.com/forums/framework/hierarchical-data-source/initial-settings-params-for-hierarchicaldatasource-treeview.aspx 

    I hope this helps!

    Mark.
  3. Christopher
    Christopher avatar
    10 posts
    Member since:
    Mar 2012

    Posted 11 Jul 2012 Link to this post

    Thanks, Mark. IT does look like there's new stuff.
    The prose on  http://demos.kendoui.com/beta/web/treeview/odata-binding.html
    indicates that it does NOT support dynamic binding but the code in the example does.
    I hope they document this well as its hard to infer everything from just the examples.

    There are 2 situations you might want to use dynamic binding.
    One is that the server has a large, static database that a user wants to browse.
    Since a given user will probably never expand all nodes, there's no need to send the whole db to the
    client. Letting the client ask for children by expanding a node is fine.

    The 2nd situation is when the data on the server is changing while a user is browsing the db.
    In my case other users can add, delete, edit and move nodes in the tree while a user is browsing.
    There are 2 ways I can think of to support this
    "The cheap way": Always display the expansion triangle. (I guess you can always declare hasChildren; true) Whenever the user expands, a call to the server
    happens to get the kids.
    "The Smart Way" UI pays attention to the hasChildren flag and shows or hides the triangle appropriately,
    but ALSO the app is written using HTML5 Channels such that the server keeps track of which users have which
    parts of the tree open and pushes new information to the client, including added/deleted/changed nodes as well as
    updating the hasChildren flag on a given node. For this to work, the client would have to
    be able to set "hasChildren" for a given node and have that display/hide the triangle.

    My biggest fear is that neither of these ways will work because the new Kendo dynamic binding might only go to the server
    the FIRST time a node is expanded and from then on it caches the results on the client and the client just
    displays the cache, not goiing to the server for the 2nd thru nth expansion of a node.
    I would be a big help to me if you could tell me whether such caching is done on the client.
    If not, then a user can at least collapse  a node then re-expand it to "refresh" the children to check
    if anything has changed since their first expansion.

    To implement "The Smart Way" there would need to be a method to call on a node on the client to
    change hasChildren and have that call automatically show/hide the triangle. In viewing the methods
    on the Beta page for TreeView there don't appear to be any such methods. I also don't see any configuation
    options about caching nodes on the client.
    Thanks!
Back to Top