Version

We recommend that you use the xamDataGrid control instead of the xamGrid control. The xamGrid is being planned for retirement over the next few years and will not receive any new features. We will continue to provide support and critical bug fixes for the xamGrid during this time. For help or questions on migrating your codebase to the xamDataGrid, please contact support.

Change Row Hover Type

The xamGrid™ control provides a very simple way of changing hover effects when a mouse cursor moves over a grid’s row or cell area. The xamGrid control’s RowHover property is used to set hover effects and it can be set to the following RowHoverType enumeration values:

RowHoverType Description

A hover effect will only be applied to a Cell on which the mouse cursor is located.

Row

A hover effect will only be applied to all Cell objects in a Row on which the mouse cursor is located

No hover effect will be applied to cell or Row even if a mouse cursor hovers over them.

The following code shows how to change the hover effect in xamGrid; this assumes that you know how to set up your WPF project for xamGrid.

Note
Note:

The following code is using data binding to custom data which is covered in the Data Binding topic.

In XAML:

<ig:XamGrid x:Name="xamGrid"
            RowHover="Row"
            ItemsSource="{Binding Source={StaticResource DataUtil}, Path=CategoriesAndProducts}" >
</ig:XamGrid>

In Visual Basic:

InitializeComponent()
' ...
Dim xamGrid As New XamGrid()
xamGrid.RowHover = RowHoverType.Row
xamGrid.ItemsSource = DataUtil.CategoriesAndProducts
Me.LayoutRoot.Children.Add(xamGrid)

In C#:

InitializeComponent();
// ...
xamGrid xamGrid = new XamGrid();
xamGrid.RowHover = RowHoverType.Row;
xamGrid.ItemsSource = DataUtil.CategoriesAndProducts;
this.LayoutRoot.Children.Add(xamGrid);

The following image shows xamGrid with the RowHover property set to Row.

xamGrid Change Row Hover Type 01.png