Completed
Last Updated: 21 Nov 2014 15:42 by ADMIN
Jacob
Created on: 14 Oct 2011 13:35
Category: Kendo UI for jQuery
Type: Feature Request
73
Additional data treeview
When you want to add a new item to TreeView you can only set the Text of that item.

Maybe it would be nice to store more data like the id of the new <li> element
14 comments
ADMIN
Telerik Admin
Posted on: 21 Nov 2014 15:42
This is already supported via the dataItem method of the treeview (http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview#methods-dataItem)
ADMIN
Telerik Admin
Posted on: 11 Apr 2014 15:28
This is not supported yet, as we haven't found a suitable means to enable it. I will forward your comments to our devteam for additional consideration.
Miguel
Posted on: 10 Apr 2014 16:17
Was resolved in the newer release?, I not find in the official documentation, I need to add new nodes with id and image (url). Thanks!
Li
Posted on: 06 Jan 2013 20:42
Yes, the ability to attach extra data is absolutely necessary. Imaging you are writing a windows explorer or outlook type of UI. We need to use the click on the tree view pane to drive the UI on the listview pane.
Imported User
Posted on: 08 Jun 2012 14:28
Need it asap !!!
cascem
Posted on: 15 Apr 2012 17:59
it is exactly what i need
King Wilder
Posted on: 12 Apr 2012 00:14
Adding additional data capabilities would be great!
Constantine
Posted on: 05 Apr 2012 03:19
+1
Aron
Posted on: 03 Apr 2012 11:21
Yeah appending a node with an ID, a class that you wish to sppend to it and if the node is to be expanded by default of other nodes are dragged to it and reloaded later on. See this for my take on it. http://jsfiddle.net/3j9kL/4/
Aron
Posted on: 03 Apr 2012 11:18
Yeah appending a node with an ID, a class that you wish to sppend to it and if the node is to be expanded by default of other nodes are dragged to it and reloaded later on.  See this for my take on it.  http://jsfiddle.net/3j9kL/2/
Cuinn
Posted on: 05 Mar 2012 23:39
Being able to add an ID would be nice, but I agree with Jacob in that additional data is more useful.  If it is added as data attributes then it also doesn't create a messy DOM.  For me the easiest way to do this would be to simply have an entire object added as a data-dataobject.

This way you can supply an object to the treeview and provided it has the expected attributes (text, spriteCssClass etc.) they would be used and then the entire object would be added?  Not sure how this would go for very large objects/treeviews but it would work for me.

Also, if this was implemented it should be done for panelbar, menu etc. as well.
Robinson
Posted on: 03 Dec 2011 18:04
always i need additional data from the treeview
Bruno
Posted on: 15 Nov 2011 21:57
I need it too!
Jacob
Posted on: 18 Oct 2011 09:38
Absolutely! I ran into this issue when trying to distinguish which item has been selected in order to save it for later use. I quickly realized that item.text() is not reliable...

Perhaps populating each items' data-* attributes would be a good way to go? This gives us ability to attach additional data (not just an ID attribute).

Overall, I think that this kind of functionality (i.e. ability to populate items' data-* for objects created programmatically) is missing in Kendo's widgets. I am free to add attributes as long as i initialize widgets from existing HTML snippets, but when I supply a data source, there's no way to put additional attributes to the generated HTML.