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

[Solved] Clicking on a treenode

1 Answer 73 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
OfficeHeart
Top achievements
Rank 1
OfficeHeart asked on 28 Feb 2011, 02:54 PM
Hi,

I am using the treeview as same in this example (great!):
http://demos.telerik.com/aspnet-mvc/treeview/ajaxloading

When clicking on an item (client side). I want to know if this item has children or not? But the children are loaded after clicking.

Do you have a suggestion?

Thanks,
Koen

1 Answer, 1 is accepted

Sort by
0
Accepted
Hristo Germanov
Telerik team
answered on 01 Mar 2011, 01:41 PM
Hi martin,

Thank you to contacting us.

I found a problem with the onExpand client event.The fix is to trigger that event when there are children to expand.You need to hook up to the onExpand client event and if it is called then you have children to expand, otherwise you haven't.

Please note that this scenario works when you double click an item or click on expand/collapse icon.

I have attached fixed telerik.treeview.min.js.

I have update your Telerik points.

Best wishes,
Hristo Germanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
TreeView
Asked by
OfficeHeart
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Share this question
or