Sathiya Narayanan
Sathiya Narayanan

Reputation: 641

Event to call after expanding or collapsing a node kendo treeview

I have a requirement to draw a svg line between a row in kendo grid (LHS) and a node in treeview (RHS). The treeview nodes can have multiple levels of children. I have to re-draw the svg line everytime a node is collapsed/expanded since the position of the nodes would change on collapse/expand. So, I am using the expand event and collapse event of kendo treeview to fetch the co-ordinates of the node after expanding/collapsing respectively. The issue is, it turns out that the expand/collapse events are called before the node is actually expanded/collapsed. So, I am getting the co-ordinates of the node before expanding/collapsing which is not what I want. Is there any event that I can call after a node is actually expanded/collapsed? Any help would be much appreciated. Thanks in advance. Cheers!

Upvotes: 2

Views: 839

Answers (1)

Carsten Franke
Carsten Franke

Reputation: 1669

Not an event, merely a workaround: Add a short setTimeout to the expand event.

Upvotes: 2

Related Questions