Home - Forums-.NET - FlyTreeView (ASP.NET) - Nested in jQuery dialog causes '... server call back' error

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Nested in jQuery dialog causes '... server call back' error
Link Posted: 22-Sep-2009 03:53
This is really causing me some headache and is very difficult to debug and the js is minified.

The web flytreeview is nested within a jQuery UI dialog (1.3.2) and has been programmatically created (as the page it is on is pretty much completely dynamic), any node with children has been set to populateNodesOnDemand. But when the next level is selected the below error alert is displayed.


Error when performing server call back:
FlyTreeView internal exception (code 88541). Please report the problem. 560.....


I debugged it in the minified js and here is the stack trace.


_f$4d (line 663)
WebForm_ExecuteCallback
WebForm_CallbackComplete


Here is how I declare the tree view (in createchildcontrols)

            m_TreeView = new FlyTreeView();
            m_TreeView.ID = "tree";
            m_TreeView.ImageSet = FlyTreeViewImageSet.MacOS;
            m_TreeView.DrawLines = true;
            m_TreeView.SlideEffect = true;
            m_TreeView.CssClass = m_PopupContainerCssClass;
            m_TreeView.PopulateNodes += new FlyTreeNodeEventHandler(m_TreeView_PopulateNodes);
            m_TreeView.SelectedNodeChanged +=
                new NineRays.WebControls.SelectedNodeChangedEventHandler(m_TreeView_SelectedNodeChanged);
            container.Controls.Add(m_TreeView);

            m_TreeView.NodeTypes.Clear();

            m_LeafNodeType.PostBackOnSelect = true;
            m_LeafNodeType.ID = "leaf";
            m_LeafNodeType.DefaultStyle.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "AssetCo.Web.Questions.Resources.treeviewquestion_leaf.gif"); //"$office2003_pyramid";
            m_TreeView.NodeTypes.Add(m_LeafNodeType);

            m_ParentNodeType.ID = "parent";
            m_TreeView.NodeTypes.Add(m_ParentNodeType);

            m_TreeView.Nodes.Clear();
            ObjectTreeNode rootNode = CreateNode(RootNodeValue);
            rootNode.Expanded = true;
            rootNode.CanBeSelected = false;
            m_TreeView.Nodes.Add(rootNode);
            BuildChildNodes(rootNode.ChildNodes, RootNodeValue);


Any help would be appreciated as I stuck.

Thanks
Link Posted: 22-Sep-2009 05:50
The error is thrown from ICallbackEventHandler.RaiseCallbackEvent method of FlyTreeView.
for "PopulateNodes" event. FlyTreeView fails to find node that user clicked to expand.

Do you rebind FlyTreeView on page load. If yes, try to put your treeview initialization code into
if (!IsPostBack) { .... } condition.