Root Nodes Alignment

2 posts, 0 answers
  1. Rob
    Rob avatar
    116 posts
    Member since:
    Aug 2012

    Posted 03 Aug 2011 Link to this post

    I have a treeview defined like this:

    <telerik:RadTreeView ID="tvHierarchy" runat="server" CheckBoxes="True" LoadingStatusPosition="BeforeNodeText" OnClientNodeChecked="tv_Check" OnClientNodeClicking="tv_Clk">
       <CollapseAnimation Duration="100" Type="None" />
        <ExpandAnimation Duration="100" />
    </telerik:RadTreeView>

    I want to populate the tree with multiple root nodes, so I'm trying this way:

    For Each rootNode As dbo_BASE_NODE In rootNodes
       Dim node As New RadTreeNode()
       node.Text = rootNode.BN_ID & " " & rootNode.BN_NAME
       node.Value = rootNode.HN_RID
       tvHierarchy.Nodes.Add(node)
    Next

    But everything is aligning to the right like this (Please see attachment radtreeview.jpg).

    I need all root nodes to align to the left with as little "whitespace" as possible.  There is no whitespace in the data.

    Thanks,
    Rob
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Aug 2011 Link to this post

    Hello Dudeman,

    Try setting the CSS as shown below.
    CSS:
    <style type="text/css">
     .RadTreeView .rtUL .rtLI .rtUL
     {
        padding-left: 0px !important;
     }
    </style>

    Thanks,
    Princy.
Back to Top