This is a migrated thread and some comments may be shown as answers.

load on demand treeview: How to change expander style

1 Answer 63 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Evgeny Vdovin
Top achievements
Rank 1
Evgeny Vdovin asked on 03 Feb 2011, 06:21 PM
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

1 Answer, 1 is accepted

Sort by
0
Evgeny Vdovin
Top achievements
Rank 1
answered on 03 Feb 2011, 07:23 PM
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
Tags
TreeView
Asked by
Evgeny Vdovin
Top achievements
Rank 1
Answers by
Evgeny Vdovin
Top achievements
Rank 1
Share this question
or