Expandable arrow not disappearing when child nodes have been removed?

2 posts, 0 answers
  1. Johan
    Johan avatar
    11 posts
    Member since:
    Mar 2008

    Posted 10 Apr 2008 Link to this post

    I use a TreeView where I instead of the "LoadOnDemand" property programmatically add Loading... sub-nodes. After fetching the requested data I populate my tree view by clearing the parent node's child nodes and then add all my received data.

    My problem is that if no data has been received, the TreeView still displays my parent node as expandable.

            public void SetTreeNodes(Collection<NodeInformation> nodeInformation, string parentKey)  
                if (m_TreeNodes.ContainsKey(parentKey))  
                    RadTreeNode parentNode = m_TreeNodes[parentKey];  
                    foreach( RadTreeNode node in parentNode.Nodes)  
                    foreach (NodeInformation information in nodeInformation)  
                        AddTreeNode(information, parentKey);  

    I currently use 2007 Q3, is this a problem that has been addressed?
  2. Jordan
    Jordan avatar
    547 posts

    Posted 11 Apr 2008 Link to this post

    Hi Johan,

    Thank you for taking the time to write us.

    If you are not setting the LoadOnDemand property of RadTreeView to true, there is nothing wrong with your code. What you are seeing is most likely the result of an issue in the VisibleCount property and the Clear method of RadTreeNodeCollection.

    This issue has already been addressed and will not be present in the 2008 Q1 release, which is due next week.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top