Problem in getting checked Nodes of the Kendo treeview

3 posts, 0 answers
  1. Dinesh
    Dinesh avatar
    3 posts
    Member since:
    Mar 2013

    Posted 29 Jul 2014 Link to this post

    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. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2877 posts

    Posted 31 Jul 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Dinesh
    Dinesh avatar
    3 posts
    Member since:
    Mar 2013

    Posted 06 Aug 2014 in reply to Alexander Valchev Link to this post

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







Back to Top