Select node on specific path

3 posts, 0 answers
  1. Siarhei
    Siarhei avatar
    1 posts
    Member since:
    Sep 2015

    Posted 06 Oct 2015 Link to this post

    Hello,

    Lets say we have 2 different paths in treeview and on child level of these paths we have the same elements (bar)

    $("#treeview").kendoTreeView({
      loadOnDemand: true,
      dataSource: [
        { text: "foo", expanded: true, items: [
          { text: "bar" }
        ] },
        { text: "ttt", expanded: true, items: [
          { text: "bar" }
        ] }
      ]
    });

     

    How can i select 'bar' node from the second path ('ttt' node)?

    There is expandPath method to expand tree that accepts array of ids to expand. I want to achieve the same but for selection.

     http://dojo.telerik.com/IFamO/4

    There i want to select 'bar' under 'ttt' node (programmatically).

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 08 Oct 2015 Link to this post

    Hello Siarhei,

    You can add ids to the items and select the node using its unique id. The approach is illustrated below:



    Regards,
    Viktor Tachev
    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. Siarhei
    Siarhei avatar
    13 posts
    Member since:
    Sep 2014

    Posted 12 Oct 2015 in reply to Viktor Tachev Link to this post

    Thanks a lot.

    It helped!!!

Back to Top