DataGridView.RowHeight Property

Gets or sets the height of data rows in the grid.

Namespace: DevExpress.XamarinForms.DataGrid

Assembly: DevExpress.XamarinForms.Grid.dll

Declaration

public double RowHeight { get; set; }

Property Value

Type Description
Double

The height of grid rows, in density-independent pixels.

Remarks

The grid automatically adjusts the height of data rows to display the entire content of cells. If you specify the RowHeight property, all data rows have the same height.

To change the height of group rows, use the GroupRowHeight property.

Grid Data Rows

Examples

This example shows how to modify the appearance of the following grid elements:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="DataGridExample.MainPage"
             xmlns:dxg="clr-namespace:DevExpress.XamarinForms.DataGrid;assembly=DevExpress.XamarinForms.Grid">
    <dxg:DataGridView x:Name="grid" ItemsSource="{Binding Orders}" 
                      RowHeight="35" TotalSummaryHeight="35">
        <!-- Specify grid columns and total summaries here. -->

        <!--Customize the appearance of grid cells.-->
        <dxg:DataGridView.CellStyle>
            <dxg:CellStyle Padding="5,5,5,5" BackgroundColor="#333333" BorderColor="#515151"
                           FontSize="8" FontColor="White" 
                           SelectionColor="#f78a09" SelectionFontColor="Black"/>
        </dxg:DataGridView.CellStyle>

        <!--Customize the appearance of column headers.-->
        <dxg:DataGridView.ColumnHeaderStyle>
            <dxg:ColumnHeaderStyle BackgroundColor="#333333" BorderColor="#515151" 
                             FontSize="12" FontColor="#929292" FontAttributes="Bold" 
                             HorizontalLineThickness="2"/>
        </dxg:DataGridView.ColumnHeaderStyle>

        <!--Customize the appearance of the total summary panel.-->
        <dxg:DataGridView.TotalSummaryStyle>
            <dxg:TotalSummaryStyle Padding="2,5,2,5" BackgroundColor="#666666" BorderColor="#515151"
                                   FontSize="8" FontColor="#f78a09"/>
        </dxg:DataGridView.TotalSummaryStyle>
    </dxg:DataGridView>
</ContentPage>

Grid Custom Appearance

See Also