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

Problem in getting checked Nodes of the Kendo treeview

2 Answers 125 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Dinesh
Top achievements
Rank 1
Dinesh asked on 29 Jul 2014, 10:55 AM
I am using  Kendo UI Tree View.
The tree view has the following nodes . 
Country
     - State
            -Province
My Task is to get the province nodes of the checked Country node.Every thing works fine,When i checked the province nodes directly by expanding the country and state ,i'm getting the selected nodes.But the problem is that , if i want to get the province nodes only by checking the country node (without expanding the parent nodes). What should i do to over come this problem?
I am using the following code.
   $("#divTreeview").kendoTreeView({
            checkboxes: {
                checkChildren: true
            },
            expanded: true,
            dataSource: dsMenu,
            dataTextField: "name",
            dataValueField: "id"
        });

 Thank you


2 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 31 Jul 2014, 07:03 AM
Hi Dinesh,

I prepared a small example which demonstrates a sample approach for getting the selected child nodes. Please check it and let me know if I am missing something.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Dinesh
Top achievements
Rank 1
answered on 06 Aug 2014, 10:39 AM
Hi Alexander Valchev,
        
                 Thank you for the support.By using your example we have tried in our application and it is working fine .
                  
                 We also find one simple option which solved the problem  .i.e  " loadOnDemand:false"
                 The Code is :
                $("#divTreeview").kendoTreeView({
                      checkboxes: {
                               checkChildren: true
                        },
                       loadOnDemand:false,                     /*This option helped in solving the problem*/
                       expanded: true,
                      dataSource: dsMenu,
                      dataTextField: "name",
                      dataValueField: "id"
                  });







Tags
TreeView
Asked by
Dinesh
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Dinesh
Top achievements
Rank 1
Share this question
or