PlusMinus Animation viivble whn no value in the child node

11 posts, 0 answers
  1. Ragupathi
    Ragupathi avatar
    41 posts
    Member since:
    Jul 2008

    Posted 26 Jul 2008 Link to this post

    I am using a Radtreeview in a windows application.I am loading the value for both parent and child node. when  there  is no value in the child node still the Plus symbol is visible. whwn clicked it is invisible.  I dont want that plus minus animation when there is no value.

    Please help us in process.

     
  2. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 28 Jul 2008 Link to this post

    Hi Ragupathi,

    I am not sure that I fully understand what you mean by "when  there  is no value in the child node".
    Do you mean when there are no child nodes?
    Also how do you do "loading the value for both parent and child node"?
    Could you give an example to clarify?

    In case you have set the LoadOnDemand property of RadTreeView to true note that you have to set recursively the LoadedOnDemand property of all nodes that have no children to true in order to hide the expand/collapse (plus/minus) button.

    All the best,
    Jordan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ragupathi
    Ragupathi avatar
    41 posts
    Member since:
    Jul 2008

    Posted 28 Jul 2008 Link to this post

    Hi jordan,

    Radtreeview which we have will not know the empty child nodes  at design time. it can be known only at runtime. so it come there as (+/-) symbol  which i dont need


    Thanks

    ragu
  5. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 29 Jul 2008 Link to this post

    Hi Ragupathi,

    Thank you for writing.

    There is two main scenarios for populating RadTreeView. It depends on LoadOnDemand property. If LoadOnDemand is false, then all nodes are created and RadTreeView automatically adds plus/minus symbol only for nodes that have children ones. If you have set LoadOnDemand = true, then plus/minus symbol is added to all nodes, because RadTreeView loads only visible ones and it doesn't know which of them have children. Children nodes load when the user in clicks on the expand symbol (on demand). You can remove expand symbol in run-time for the certain nodes, that you know they have not children, by setting theirs LoadedOnDemand property to true:
    radTreeView1.Nodes[5].LoadedOnDemand = true

    If you have other questions, do not hesitate to contact me again.

    Greetings,
    Martin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Seth
    Seth avatar
    66 posts
    Member since:
    Oct 2009

    Posted 28 Nov 2011 Link to this post

    This method is no longer supported.  How do we achieve this with the latest version (2011.3.11.1116) of the toolkit?
  7. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 30 Nov 2011 Link to this post

    Hi Seth,

    I use the follwing Code where TreeNodeInfo is a Class where I store amongst other things the number of potential childnodes.

    private void softwareRadTreeView_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
    {
        TreeNodeInfo info = e.Node.Tag as TreeNodeInfo;
     
        if (info != null)
        {
            if (info.PotentialChildNodes > 0)
            {
                e.NodeElement.ExpanderElement.Visibility = ElementVisibility.Visible;
            }
            else
            {
                e.NodeElement.ExpanderElement.Visibility = ElementVisibility.Hidden;
            }
        }
    }
  8. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 01 Dec 2011 Link to this post

    Hello Seth,

    We introduced several new features in RadTreeView since 2008 and some of them caused breaking changes. Yes, we removed the LoadOnDemand property from RadTreeView. You should handle the NodesNeeded event instead. Find more details in our online documentation. There is also an example in our demo application which demonstrates how to use the load on demand feature: TreeView >> Populate with data >> Load on Demand.

    Regarding the expand/collapse visibility, you could use the solution provided by Erwin. 

    I hope this helps, if you need further assistance, we will be glad to help.

    @erwin, thank you for sharing your solution.
     
    All the best,
    Jack
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

  9. Seth
    Seth avatar
    66 posts
    Member since:
    Oct 2009

    Posted 01 Dec 2011 Link to this post

    Thanks for the sample, I used that to hide the Expander based on Node Level.
  10. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 02 Dec 2011 Link to this post

    Hi Seth, I am glad to hear that this issue is solved now. If you have any additional questions, please do not hesitate to ask.
     
    Best wishes,
    Jack
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

  11. Pete
    Pete avatar
    14 posts
    Member since:
    Jun 2010

    Posted 11 May 2012 Link to this post

    Hello,
    I need this same functionality (remove the '+' icon if no child nodes are present) with the LoadOnDemand properly set to true.  I am using the ajax aspx telerik controls and I can not find the radtreee_formatting event. Has this changed or does this exist with what i'm using? I have the latest and greatest controls from Telerik.
  12. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 15 May 2012 Link to this post

    Hi Pete,

    Thank you for writing.

    The current forum thread refers to RadTreeView for WinForms and the information here is not applicable to the technology you are using. I kindly ask you to open a new thread in the ASP.NET AJAX forums where you will receive proper support.

    All the best,
    Boryana
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready