treelist close all

5 posts, 0 answers
  1. Manuel
    Manuel avatar
    3 posts
    Member since:
    Apr 2017

    Posted 26 Apr Link to this post

    Hi how can i close second level  nodes please.

     

    https://s10.postimg.org/8ouy6zo95/Capturar.jpg

     

    Thank you
  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2083 posts

    Posted 28 Apr Link to this post

    Hi Manuel,

    The TreeList API has collapse method, which accepts a TR element (corresponding to the record) that will be collapsed. For your convenience, I have created the following dojo example, which demonstrates how you could use the collapse method and the rendering of the TreeList to achieve the desired result:
    Hope this helps.


    Regards,
    Konstantin Dikov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Manuel
    Manuel avatar
    3 posts
    Member since:
    Apr 2017

    Posted 28 Apr in reply to Konstantin Dikov Link to this post

    Thank you

    Konstantin Dikov that is what i need thank you

     

  4. Manuel
    Manuel avatar
    3 posts
    Member since:
    Apr 2017

    Posted 28 Apr Link to this post

    now im getting a error and averything get slow

    Um script nesta página pode estar ocupado ou pode ter parado de responder. Pode parar o script agora, a
    Script: http:/Con…s/plugins/jquery/jquery.min.js:4

     

     function onClickCollapse() {
                console.log("onClickCollapse");
            var level = 1;
            var treeList = $("#DefinitionTreeList").data("kendoTreeList");
            var rows = treeList.element.find(".k-grid-content [role='row']");
            rows.each(function () {
                var row = $(this);
                if(row.find(".k-i-none").length == level){
                    treeList.collapse(row);
                }
            })
        }

  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2083 posts

    Posted 02 May Link to this post

    Hi Manuel,

    Could you please modify the dojo example from my previous post, so it could replicate the error that you are receiving:
    Looking forward to your reply.


    Regards,
    Konstantin Dikov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top