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

Expand and collapse ('-' and '+') is not shown

2 Answers 114 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Raj Sharma
Top achievements
Rank 1
Raj Sharma asked on 03 Feb 2010, 09:13 PM

I have created a control derived from Telerik.WinControls.UI.RadTreeView (Latest trial version)

I am also creating the RadTreeNode on fly..

I am setting below properties at runtime.

groupTreeView.AllowArbitaryItemHeight =

true;

 

 

 groupTreeView.AllowPlusMinusAnimation = 

true;

 

 

 groupTreeView.DropFeedbackColor = 

Color.Black;

 

 

 groupTreeView.Enabled = 

true;

 

 

 groupTreeView.ExpandAnimation =

ExpandAnimation.Opacity;

 

 

 groupTreeView.Focusable =

true;

 

 

 

groupTreeView.PlusMinusAnimationStep = 10;

 

groupTreeView.ShowExpandCollapse =

true;

 

 

 groupTreeView.ToggleMode =

ToggleMode.SingleClick;

 

 

 groupTreeView.UseNewLayoutSystem =

true;

but this does not show me the Expand(+) and collapse(-) sign.


Note my TreeViewXML..
<?xml version="1.0" encoding="utf-16"?>
<TreeView xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" UseDefaultSelection="true" AllowDragDrop="true" AllowPlusMinusAnimation="true" ThemeName="Office2007Black" AllowDrop="true" BackColor="Window" DropFeedbackColor="Red" LineColor="ActiveCaption">
</TreeView>
Please help..

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 08 Feb 2010, 08:42 AM
Hi Raj Sharma,

When inheriting from RadTreeView you also need to override ThemeClassName property and return the full name of the RadTreeView type. For example:

 

public class MyTreeView : RadTreeView
{
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadTreeView).FullName;
        }
 
        set
        {
            base.ThemeClassName = value;
        }
    }
}

The expand collapse images are most likely not being shown because they are set through styles and the themes for RadTreeView are not valid for your type. Overriding the ThemeClassName property should do the trick. Please write again if you have other questions.

Sincerely yours,
Victor
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Raj Sharma
Top achievements
Rank 1
answered on 12 Feb 2010, 06:21 PM
thanks a lot.. things have started working as expected...

Tags
Treeview
Asked by
Raj Sharma
Top achievements
Rank 1
Answers by
Victor
Telerik team
Raj Sharma
Top achievements
Rank 1
Share this question
or