Collapse/expand all no slide effect

3 posts, 1 answers
  1. Mark
    Mark avatar
    90 posts
    Member since:
    Jul 2014

    Posted 17 Jul 2015 Link to this post

    Hi,

     I've added a collapse/expand all option to my treeview, which works fine, but doesn't have any slide effects.  On the demo one (http://demos.telerik.com/kendo-ui/treeview/api) it has slide effects for this.

    Are there settings I need to apply somewhere to make this work?  I have 3 treeviews on top of each other and my button works for all at once - here are the relevant bits of javascript code :-

    // 1. collapse all treeview nodes
    var treeview = $("#TreeViewSurveyByRisk").data("kendoTreeView").collapse(".k-item");
    var treeview = $("#TreeViewSurveyByRecAction").data("kendoTreeView").collapse(".k-item");
    var treeview = $("#TreeViewSurveyByLocation").data("kendoTreeView").collapse(".k-item");

    // 2. expand all treeview nodes
    var treeview = $("#TreeViewSurveyByRisk").data("kendoTreeView").expand(".k-item");
    var treeview = $("#TreeViewSurveyByRecAction").data("kendoTreeView").expand(".k-item");
    var treeview = $("#TreeViewSurveyByLocation").data("kendoTreeView").expand(".k-item");

    Any help would be appreciated.

    Thanks, Mark

  2. Answer
    Plamen Lazarov
    Admin
    Plamen Lazarov avatar
    135 posts

    Posted 21 Jul 2015 Link to this post

    Hello Mark,

    The described behavior can be observed if the widget is bound to remote data - this is a known limitation. On initial expand there will be no animation, however on every consecutive expand / collapse the animation should be present. If your case is different from the one mentioned above we will need an isolated runnable example in order to test the issue locally and provide concrete recommendations. 

    Regards,
    Plamen Lazarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Mark
    Mark avatar
    90 posts
    Member since:
    Jul 2014

    Posted 22 Jul 2015 in reply to Plamen Lazarov Link to this post

    Thanks Plamen,

    It's not a major issue so I'll have a play around with what's there.

    Thanks,

    Mark

Back to Top