This is a migrated thread and some comments may be shown as answers.

treelist close all

4 Answers 34 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Manuel
Top achievements
Rank 1
Manuel asked on 26 Apr 2017, 06:46 PM

Hi how can i close second level  nodes please.

 

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

 

Thank you

4 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 28 Apr 2017, 01:40 PM
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.
0
Manuel
Top achievements
Rank 1
answered on 28 Apr 2017, 04:29 PM

Thank you

Konstantin Dikov that is what i need thank you

 

0
Manuel
Top achievements
Rank 1
answered on 28 Apr 2017, 07:03 PM

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);
            }
        })
    }

0
Konstantin Dikov
Telerik team
answered on 02 May 2017, 10:57 AM
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.
Tags
TreeList
Asked by
Manuel
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Manuel
Top achievements
Rank 1
Share this question
or