# grid-grid-control-selection

> GridControl with an Options pane that toggles Excel-like current cell, switches selection modes, and reports selections to a TextBox.

**Framework:** wpf  **Component:** Grid  **Variant:** grid-control-selection

## 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-grid-control-selection.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.SfGrid.WPF
```

**Notes**

- Syncfusion release: 2026 Volume 2 (v34.1.29)
- 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-grid-control-selection/Grid.xaml

```xaml
<democommon:DemoControl
    xmlns:democommon="clr-namespace:syncfusion.demoscommon.wpf;assembly=syncfusion.demoscommon.wpf" x:Class="syncfusion.gridcontroldemos.wpf.GridControlSelection"
                             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"
                             Background="White">

    
            <ScrollViewer CanContentScroll="True"
                          HorizontalScrollBarVisibility="Auto"
                          VerticalScrollBarVisibility="Auto">
                <syncfusion:GridControl x:Name="grid" />
            </ScrollViewer>

    <democommon:DemoControl.Options>
        <ScrollViewer>
        <StackPanel Name="stackPanel1">

            <CheckBox Name="checkBox1"
                              Margin="5"
                              Content="Do not select cell 3,3" />
            <CheckBox Name="checkBox2"
                              Margin="5"
                              Checked="checkBox2_Checked"
                              Content="ExcelLike CurrentCell"
                              Unchecked="checkBox2_Checked" />

            <RadioButton Name="radioButton1"
                                 Margin="5"
                                 Checked="radioButton_Checked"
                                 Content="Any Selections" />

            <RadioButton Name="radioButton2"
                                 Margin="5"
                                 Checked="radioButton_Checked"
                                 Content="Rows Only" />

            <RadioButton Name="radioButton3"
                                 Margin="5"
                                 Checked="radioButton_Checked"
                                 Content="Columns Only" />

            <RadioButton Name="radioButton4"
                                 Margin="5"
                                 Checked="radioButton_Checked"
                                 Content="Rows and Columns Only" />

            <RadioButton Name="radioButton5"
                                 Margin="5"
                                 Checked="radioButton_Checked"
                                 Content="ListBox Selections" />

            <Button Margin="5"
                            Click="Button_Click"
                            Content="Show Selections" />

            <TextBox Name="textBox1"
                             Height="210"
                             Margin="5"
                             HorizontalScrollBarVisibility="Visible"
                             IsReadOnly="True"
                             VerticalScrollBarVisibility="Visible" />
        </StackPanel>
        </ScrollViewer>
    </democommon:DemoControl.Options>
</democommon:DemoControl>

```
