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

MaxRowHeight

1 Answer 51 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kakone
Top achievements
Rank 1
Kakone asked on 26 May 2010, 10:46 AM
Hello,

Is it possible to define a maximum row height with the RadDataGridView ? I would like to adjust the row height automatically but not exceed a maximum value.

Cordially,
Stephane.

1 Answer, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 27 May 2010, 06:37 AM
Hi Stéphane Mitermite,

You can apply a MaxHeight constraint of the rows by create a simple custom row style:

<UserControl.Resources>
    <Style x:Key="CustomRowStyle" TargetType="telerik:GridViewRow">
        <Setter Property="MaxHeight" Value="400"/>
    </Style>
</UserControl.Resources>
<Grid>
    <telerik:RadGridView Name="playersGrid" RowStyle="{StaticResource CustomRowStyle}"
                                 ItemsSource="{Binding Players}" 
                                 AutoGenerateColumns="False">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Number}"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Position}"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Country}"/>
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>
</Grid>


Sincerely yours,
Milan
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.
Tags
GridView
Asked by
Kakone
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or