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

Select selected node

2 Answers 172 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
BigzampanoXXl
Top achievements
Rank 1
BigzampanoXXl asked on 11 Jan 2013, 07:50 AM
Hello,

is it possible to "select" the node which is currently selected? Right now the select-event doesn't trigger if the node is already selected. I need it to be triggered each time the user clicks on a node.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 14 Jan 2013, 08:49 AM
Hello Dietmar,

You can bind a filtered event handler which triggers a select event.

    var treeview = $("#treeview").data("kendoTreeView");
    treeview.wrapper.on("click", ".k-state-selected", function(e) {
        treeview.trigger("select", {
            node: $(e.target).closest(".k-item")[0]
        });
    });

Regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
BigzampanoXXl
Top achievements
Rank 1
answered on 15 Jan 2013, 09:27 AM
Hi Alex,

thank you for your solution. Works fine!
Tags
TreeView
Asked by
BigzampanoXXl
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
BigzampanoXXl
Top achievements
Rank 1
Share this question
or