Expand on Demand

3 posts, 0 answers
  1. Shawn
    Shawn avatar
    49 posts
    Member since:
    Jul 2011

    Posted 30 Jun 2012 Link to this post

    Does the TreeView support Expand-on-Demand?  If so could you please provide an example of how to implement this?  If not, do you have any idea by when we can expect this feature?
  2. Iwhp
    Iwhp avatar
    40 posts
    Member since:
    Dec 2009

    Posted 13 Aug 2012 Link to this post

    Same issue here.
    I have a TreeView with a HierarchicalDataSource. When using Drag&Drop, the control seems not to work properly, since not all data is yet available. I tried to intercept and using the expand method. But using the expand method does not initiate a "get Data" for the HierarchicalDataSource...
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Iwhp
    Iwhp avatar
    40 posts
    Member since:
    Dec 2009

    Posted 14 Aug 2012 Link to this post

    Found that toggle does behave differently than expand.
    If one uses toggle with a HierarchicalDataSource, the node gets filled with the data and expanded.

    The following sample uses the select-event, and toggles the node. If the data is not yet loaded, it will first get the data, if the data is load, it just toggles between expand and collapse...

    treeview.bind("select", function (e) {
       treeview.toggle(e.node);
    });
Back to Top