load on demand treeview: How to change expander style

2 posts, 0 answers
  1. Evgeny Vdovin
    Evgeny Vdovin avatar
    29 posts
    Member since:
    May 2006

    Posted 03 Feb 2011 Link to this post

    Hi 

    How can I change expander style on TreeView
    I use load on demand to load my treeview items.
    Please see attach image:
    What I want to do is:
    1. Remove the expander ( tri-angle) from Commodity 2 and Commodity 4, but keep the expanders of others, as Commodity 2 and 4 are not expandable.

    Is there a way to do it (using binding) ? Please give me an example.

    Regards, 
    Evgeny Vdovin
  2. Evgeny Vdovin
    Evgeny Vdovin avatar
    29 posts
    Member since:
    May 2006

    Posted 03 Feb 2011 Link to this post

    Problem solved.
    The expander show because it is "load on demand" mode.
    Use 
     private void RadTreeView1_ItemPrepared(object sender, RadTreeViewItemPreparedEventArgs e)
            {
                RadTreeViewItem item = e.PreparedItem; ;
                item.IsLoadOnDemandEnabled =my logic;
            }

    could dynamic hide / show the expander.

    John
  3. DevCraft banner
Back to Top