node text indentation

2 posts, 0 answers
  1. mdk
    mdk avatar
    24 posts
    Member since:
    May 2007

    Posted 17 Feb 2010 Link to this post

    Hey guys,
    Is there a way to to set indentation of a node with sub nodes so that it's expand/collapse icon is flush left with the text of nodes that do not have sub nodes?
    Thanks in advance,
    mdk
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 19 Feb 2010 Link to this post

    Hi mdk,

    It can be achieved like this:

    <telerik:RadTreeView ID="tree1" runat="server" ShowLineImages="false">
        <Nodes>
            <telerik:RadTreeNode Text="root">
                <Nodes>
                    <telerik:RadTreeNode Text="node 1" />
                    <telerik:RadTreeNode Text="node 2" />
                    <telerik:RadTreeNode Text="node 3" />
                    <telerik:RadTreeNode Text="node 4" />
                    <telerik:RadTreeNode Text="node 5" />
                </Nodes>
            </telerik:RadTreeNode>
            <telerik:RadTreeNode Text="root node 2" ContentCssClass="noChilds" />
            <telerik:RadTreeNode Text="root node3" ContentCssClass="noChilds" />
        </Nodes>
    </telerik:RadTreeView>

    and the used "noChilds" css class:

    .noChilds  {
        padding-left: 0 !important;
    }

    Kind regards,
    Yana
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top