RadTreeListView

2 posts, 0 answers
  1. Neha
    Neha avatar
    2 posts
    Member since:
    Dec 2012

    Posted 24 Dec 2012 Link to this post

    Hi,

     

    I am using Silverlight Telerik RadTreeListView control, I want to set the margin of all nodes (parent & child). 
     1. want to reduce the space between ExpanderControl (in my case it is +/- sign) and Node's Text. (Horizontal Space) 
     2. want to adjust the margin of child elements. (mainly, Left margin) 
     3. want to reduce the space between All the items. (mainly, Top margin - Vertical Space)

    My xaml code is as below.

     

    <Grid x:Name="LayoutRoot”>

            <Grid.Resources>

                <Style x:Name="buttonStyle" TargetType="telerik:GridViewToggleButton">

                    <Setter Property="PresentationMode" Value="PlusMinus" />

                </Style>

            </Grid.Resources>

            <telerik:RadTreeListView x:Name="rtSalesInvoicingMenu" ItemsSource="{Binding TreeNodes, Mode=TwoWay}" RowIndicatorVisibility="Collapsed" ShowColumnHeaders="False" AutoGenerateColumns="False" GridLinesVisibility="None" IsReadOnly="True" CanUserFreezeColumns="False" RowLoaded="SalesInvoicingMenu_RowLoaded" CurrentCellChanged="SalesInvoicingMenu_CurrentCellChanged" HierarchyExpandButtonStyle="{StaticResource buttonStyle}" Margin="0" Padding="0" BorderBrush="{x:Null}">

                <telerik:RadTreeListView.ChildTableDefinitions>

                    <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children, Mode=TwoWay}" />

                </telerik:RadTreeListView.ChildTableDefinitions>

                <telerik:RadTreeListView.Columns>

                    <telerik:GridViewDataColumn DataMemberBinding="{Binding LocalisedText, Mode=TwoWay}" />

                </telerik:RadTreeListView.Columns>

            </telerik:RadTreeListView>

        </Grid>

     

    Can anyone guide me??

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 24 Dec 2012 Link to this post

    Hi,

    As to your questions:
    1. Unfortunately currently this could not be done. 
    2, 3 You can define an implicit Style targeting GridViewCell similar to:

    <Style TargetType="telerik:GridViewCell">
       <Setter Property="HorizontalContentAlignment" Value="Left"/>
       <Setter Property="Padding" Value="0"/>
       <Setter Property="Margin" Value="0"/>
    </Style>

    Then please set s smaller RowHeight for the TreeListView.

    I hope this helps you to achieve your goal.

    Kind regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top