3 Answers, 1 is accepted
You need to set the MinHeight property. By default it is 24.
Best wishes,
Valentin.Stoychev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Hi, Valentin.Stoychev
I tried it, but the row still keeps the same height, no matter what I do. The Grid's height still keep the same.
Any advice?
Thanks,
</
HierarchicalDataTemplate.Resources>
<StackPanel>
<Grid ToolTipService.ToolTip = "{Binding TooltipText}" MinHeight="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MinHeight="15"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="350"/>
<ColumnDefinition Width="350"/>
<ColumnDefinition Width="350"/>
<ColumnDefinition Width="350"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border BorderBrush="Black" Height="15" Tag="{Binding Path=Sample, Mode=TwoWay}" BorderThickness="1, 0.5, 0, 0.5" Grid.Column="0"/>
<Border BorderBrush="Black" Height="15" Tag="{Binding Path=Sample, Mode=TwoWay}" BorderThickness="1,0.5,1,0.5" Grid.Column="1" />
<TextBlock Grid.Column="0" Margin="0,0,0,0" Height="15" Text="{Binding Path=Name, Mode=TwoWay}" />
<TextBlock Grid.Column="1" Margin="0,0,0,0" Height="15" Text="{Binding Path=Sample, Mode=TwoWay}" />
</Grid>
</StackPanel>
</HierarchicalDataTemplate>
<Border Grid.Row="1" Name="treeviewBorder" BorderBrush="#FF000000" CornerRadius="1" BorderThickness="1" Background="#FFFFFFFF" MinHeight="15">
<Telerik:RadTreeView x:Name="treeView1" ExpanderStyle="{StaticResource Expander}" IsEditable="true" HorizontalAlignment="Left"
VerticalAlignment="Top" IsLineEnabled="True" ScrollViewer.VerticalScrollBarVisibility="Auto" MinHeight="15" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.CanContentScroll="True" Selected="treeView1_Selected" ItemPrepared="treeView1_ItemPrepared"
ItemTemplate="{DynamicResource Element}">
<Telerik:RadTreeView.ItemEditTemplate>
<HierarchicalDataTemplate>
<StackPanel Orientation="Horizontal">
<Grid ToolTipService.ToolTip = "{Binding TooltipText}" MinHeight="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MinHeight="15"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<Border BorderBrush="Black" Height="15" Tag="{Binding Path=Sample, Mode=TwoWay}" BorderThickness="1, 0.5, 0, 0.5" Grid.Column="0"/>
<Border BorderBrush="Black" Height="15" Tag="{Binding Path=Sample, Mode=TwoWay}" BorderThickness="1,0.5,1,0.5" Grid.Column="1" />
<TextBlock Grid.Column="0" Margin="0,0,0,0" Height="15" Text="{Binding Path=Name, Mode=TwoWay}" />
<TextBlock Grid.Column="1" Margin="0,0,0,0" Height="15" Text="{Binding Path=Sample, Mode=TwoWay}" />
</Grid>
</StackPanel>
</HierarchicalDataTemplate>
</Telerik:RadTreeView.ItemEditTemplate>
</Telerik:RadTreeView>
Please find attached an example.
If you have any further question please do not hesitate to ask.
I hope this will help you.
All the best,
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.