All Products
Demos
Pricing
Services
Blogs
Docs & Support
Search
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX Forum
/
TreeView
/
DataItem in Databound Treeview
Cancel
Telerik UI for ASP.NET AJAX
Resources
Buy
Try
Feed for this thread
3 posts, 1 answers
Viktor Takacs
95 posts
Member since:
Mar 2006
Posted 08 Jul 2011
Link to this post
Hi,
Is there a way to retrieve the dataitem of the clicked node in a databound treeview? In the
NodeClick event the e.Node.DataItem is null. I can only get the text.
Thanks for any ideas!
v
Answer
Shinu
17764 posts
Member since:
Mar 2007
Posted 11 Jul 2011
Link to this post
Hello Viktor,
The DataItem property is available only during databinding in the NodeDataBound event. You cannotnot use it elsewhere. You can use the
Value
property or
Custom Attributes
instead.
Thanks,
Shinu.
Viktor Takacs
95 posts
Member since:
Mar 2006
Posted 11 Jul 2011
Link to this post
Hi Shinu,
Thanks for the reply. I see now that I can use a custom attribute to hold an id of some sort.
Thanks!
viktor
Back to Top
Close