[quote="raghu.dodda"]. Also, we want to wrap the flyTreeView client-side instance inside a JavaScript class. Therefore, I think attaching the javascript event-handler to listen for the tree to finish initialization is not the best approach for me.
Anyway, you need to launch your code after CFlyTreeView class is loaded (place your code at the end of your page).
[quote="raghu.dodda"]
For example: Here's what I want to be able to do in JavaScript
// LINE 1
var myHierarchyControl = new HierarchyControl(flyTreeViewClientId);
function HierarchyControl(flyTreeViewInstanceId)
{
// a private member of this class, not exposed outside.
var _tree = CFlyTreeView.getInstancebyId(flyTreeViewClientId);
this.AddNode = function()
{
// basically all operations on the tree happen through this class.
_tree.Nodes.Add();
}
_tree.Nodes.Add() will not work. FlyTreeView client-side and server side models are not equal.