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

RadGridView RowHeight doesn't work

2 Answers 225 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chunyang
Top achievements
Rank 1
Chunyang asked on 26 Dec 2018, 03:05 PM

Hello,

I set RadGridView RowHeight to 100, but it doesn't work, it's still small

How can I set the custom rowheight for each row?

Thanks

2 Answers, 1 is accepted

Sort by
0
Gianfranco
Top achievements
Rank 1
answered on 26 Dec 2018, 10:30 PM

Hi

I'll give you an example that works very well for me

 

<telerik:RadGridView x:Name="RadGridViewCities" GroupRenderMode="Flat" VerticalAlignment="Top" HorizontalAlignment="Left"

telerik:StyleManager.Theme="Summer"
MinHeight="386"
MaxHeight="790"
Margin="10,51,0,-38"
RowHeight="100"
EnableRowVirtualization="True"    
ItemsSource="{Binding Cities}"
IsSynchronizedWithCurrentItem="True"
IsManipulationEnabled="False"
IsReadOnly="True"
ShowColumnSortIndexes="True"
AutoGenerateColumns="False"
CanUserFreezeColumns="False"
CanUserResizeColumns="False" Height="775" SelectionChanged="RadGridViewCities_SelectionChanged" MouseDoubleClick="RadGridViewCities_MouseDoubleClick" Width="534">

            <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn Header="CAP" DataMemberBinding="{Binding PostalCode}"  Width="80"/>
                        <telerik:GridViewDataColumn Header="Città" DataMemberBinding="{Binding Description}" Width="330" />
                        <telerik:GridViewDataColumn Header="Provincia" DataMemberBinding="{Binding Province}" Width="80" />
            </telerik:RadGridView.Columns>
</telerik:RadGridView>

 

0
Yoan
Telerik team
answered on 27 Dec 2018, 07:07 AM
Hi Chunyang,

Setting the RowHeight property of RadGridView should work as expected. Please check if there is a style that is overriding your setting.

As for different row heights - this could be achieved by using a RowStyleSelector. Please check the RowStyleSelector help article which illustrates how to conditionally style rows.

Regards,
Yoan
Progress Telerik
Get quickly and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Chunyang
Top achievements
Rank 1
Answers by
Gianfranco
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or