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

Customise node type

2 Answers 69 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
ali
Top achievements
Rank 1
ali asked on 17 Feb 2009, 12:47 PM
Hi,
I need to customise the look of certain nodes. I need to alter the style so that they sit closer together than other types of nodes.
I have tried setting the CssClass property of these nodes to my own css class in which I set the height as I wish.
The problem is that the height of the row seems to be controlled by a span which appears before the img and the text span. This span has it's class set to rtSp which defines height to be 20px.

The node looks like this:
<LI class-rtLI>
    <DIV class=rtMid>
        <SPAN class=rtSp>
        <IMG class=rtImg>
        <SPAN class=rtIn MyClass>
            Node Text

Where rtSp the class that I need to be able to change (change height from 20px to 16px) in order to control the height (but only for specific nodes)
and MyClass is the class I created to attempt to change the height of the whole node.


Thanks for your help
        

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 17 Feb 2009, 01:01 PM
Hello ali,

Please try setting the ContentCssClass property of the node. Then use the following selector

.MyClass .rtSp
{
 height: 30px !important;
}

I hope this helps,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ali
Top achievements
Rank 1
answered on 17 Feb 2009, 05:37 PM
Hi,

Thanks that worked. Although I found that I had to also add the following to my stylesheet

.MyClass .rtIn
{
    padding:0px 0px 0px 0px!important;
}

This is so that when the node is selected the box around the node is reduced in size also.
The only problem left is that even after adding this, when the node is being edited the bottom border of the textbox becomes invisible. It looks strange. I don't know if you have a solution for this.
Tags
TreeView
Asked by
ali
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
ali
Top achievements
Rank 1
Share this question
or