# grid-rowselection

> GridControl with cell navigation, row/column selection modes, and selection highlights.

**Framework:** wpf  **Component:** Grid  **Variant:** rowselection

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/wpf/grid-rowselection.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.SfGrid.WPF
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/grid-rowselection/grid.xaml

```xaml
<UserControl x:Class="syncfusion.datagriddemos.wpf.RowSelection.Grid"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf" Unloaded="OnSampleUnloaded">
    <Grid Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="250"/>
        </Grid.ColumnDefinitions>

        <!-- DataGrid -->
        <syncfusion:SfDataGrid 
            Grid.Column="0"
            x:Name="dataGrid"
            ItemsSource="{Binding Products}"
            SelectedItem="{Binding SelectedProduct, Mode=TwoWay}"
            SelectionMode="Single"
            ColumnSizer="Star">
        </syncfusion:SfDataGrid>

        <!-- Details Panel -->
        <StackPanel Grid.Column="1" Margin="10" Background="#F5F5F5">
            <TextBlock Text="Selected Product" FontWeight="Bold" FontSize="14" Margin="5"/>
            <TextBlock Text="{Binding SelectedProduct.Product}" Margin="5" TextWrapping="Wrap" FontSize="12"/>
            <TextBlock Text="Rating:" Margin="5,10,5,5" FontWeight="Bold"/>
            <TextBlock Text="{Binding SelectedProduct.UserRating}" Margin="5" FontSize="12"/>
            <TextBlock Text="Price:" Margin="5,10,5,5" FontWeight="Bold"/>
            <TextBlock Text="{Binding SelectedProduct.Price}" Margin="5" FontSize="12"/>
            <TextBlock Text="Availability:" Margin="5,10,5,5" FontWeight="Bold"/>
            <TextBlock Text="{Binding SelectedProduct.Availability}" Margin="5" FontSize="12"/>
        </StackPanel>
    </Grid>
</UserControl>

```
