Skip to content

SyncfusionExamples/How-to-apply-row-hover-background-color-in-.NET-MAUI-DataGrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

How to apply row hover background color in .NET MAUI DataGrid?

This article demonstrates how to apply row hover background color in .NET MAUI DataGrid.

In SfDataGrid, the row hover highlighting effect can be enabled by configuring the AllowRowHoverHighlighting property to true.. To customize the background color when a row is hovered, use the RowHoveredBackground property within the SfDataGrid.DefaultStyle. This ensures that the specified color is applied to the row when the mouse hovers over it.

XAML

<ContentPage xmlns:syncfusion="http://schemas.syncfusion.com/maui">
    <ContentPage.Content>
        <syncfusion:SfDataGrid x:Name="dataGrid"
                               ItemsSource="{Binding OrderInfoCollection}"
                               AllowRowHoverHighlighting="True">
            <syncfusion:SfDataGrid.DefaultStyle>
                <syncfusion:DataGridStyle RowHoveredBackground ="#AFD5FB"/>
            </syncfusion:SfDataGrid.DefaultStyle>
        </syncfusion:SfDataGrid>
    </ContentPage.Content>
</ContentPage>

Download the complete sample from GitHub

About

This demo shows how to apply row hover background color in .NET MAUI DataGrid?

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages