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

[Solved] How to change row height

2 Answers 143 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Toshendra
Top achievements
Rank 1
Toshendra asked on 20 Jul 2009, 01:21 PM
By default row height is very big, I can see there is lots of margin above and below. Is there any way to change row height so that it will be small enough to suit the font size?

2 Answers, 1 is accepted

Sort by
0
Missing User
answered on 21 Jul 2009, 06:09 AM
Hello Toshendra,

To modify the height of the grid rows you will need to create a style for the rows and specify their height in a setter. The XAML below will set the MinHeight of the row to 15:

xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"        
xmlns:gridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" 
     ......  
 
<Style TargetType="gridView:GridViewRow" x:Key="RowStyle">  
    <Setter Property="MinHeight" Value="15"/>  
</Style> 
     ......  
 
<telerik:RadGridView x:Name="RadGridView1" RowStyle="{StaticResource RowStyle}" /> 

Let me now if you need any further assistance.

Regards,
Anastasia
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
Toshendra
Top achievements
Rank 1
answered on 21 Jul 2009, 08:16 AM
Thanks That Works!
Tags
GridView
Asked by
Toshendra
Top achievements
Rank 1
Answers by
Missing User
Toshendra
Top achievements
Rank 1
Share this question
or