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

Dynamicaly Changing the Image of expander of Treeview

3 Answers 165 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kiran Mandapati
Top achievements
Rank 1
Kiran Mandapati asked on 05 May 2011, 05:04 PM
Hi,
I am facing an issue while using the telerik treeview in below scenerio.
the images of the expander has to be changed and it has to be dynamically chosen between two images based on the data is binded to it.
when data is binded to the treeview, based on the boolean column, the nodes has to display different images, if this value is true it has to show one image and if it false it has to show another image.
when the node has expanded, then the image of that noted should be rotated version of the image shown earlier (before expanding).

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 09 May 2011, 09:13 AM
Hi Kiran Mandapati,

You could dynamically control the expander style and place an image inside the style in order to achieve your scenario. You could take a look at the following article which I thing should be of help: http://blogs.telerik.com/hristomilyakov/posts/11-01-17/controlling_treeview_s_expanderstyle_dynamically.aspx

All the best,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kiran Mandapati
Top achievements
Rank 1
answered on 10 May 2011, 03:05 PM
Hi Hristo,

we were using the telerik controls for WPF with version 2009.3.1314.35, in this version we could not found the property ExpanderStyle.
is this property recently added or it exists in the version I am using as well. if it is recently added please suggest another method.
0
Kiril Stanoev
Telerik team
answered on 13 May 2011, 08:58 AM
Hi Kiran,

The ExpanderStyle property was added after the 2009.3.1314.35 release. As a workaround, instead of changing the expander style dynamically, you will have to change the style of the whole TreeViewItem.

All the best,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Kiran Mandapati
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Kiran Mandapati
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or