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

Callback function or parameter for each treeview item

1 Answer 109 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 28 Oct 2013, 02:20 PM
Hi everyone! 

I'm having a problem with treeview - I need to set a callback function (or an individual parameter to a common function, which would be even better) for the click event on each treeview leaf element (or all elements regardless whether they be leaf or non-leaf node). Imagine it as a structured menu for javascript functions (not http links).


 I'm now using a very unelegant and unnice workaround with javascript: link in dataUrlField. I'v been reading through this forum, SO and whatever google threw at me but could not find any single mention about callbacks in the treeview other than dataUrlField and the select event, use of which I find as unfeasible as the first possibility I mentioned. 

Thank you very much for ideas and suggestions.

Pavel

1 Answer, 1 is accepted

Sort by
0
Pavel
Top achievements
Rank 1
answered on 28 Oct 2013, 02:44 PM
Oh yes, sometimes the best thing to do is to ask. Never mind my question, I've found the answer right under my nose in the documentation: http://docs.kendoui.com/getting-started/web/treeview/overview#getting-the-node-data-in-the-select-event-handler
Tags
TreeView
Asked by
Pavel
Top achievements
Rank 1
Answers by
Pavel
Top achievements
Rank 1
Share this question
or