# Basic Selection

RadGridView provides you with a selection functionality, which allows the user to select one or more items (rows or cells) from the data displayed by the control.

> tip The selection mechanism can be controlled programmatically as well. For more information, take a look at the topic [Selecting Rows and Cells Programmatically](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/selection/selecting-rows-and-cells-programmatically).

## Basic row selection

By default RadGridView allows the user to select only one row. In this case the default property settings are:

```C#
radGridView1.MultiSelect = false;
radGridView1.SelectionMode = GridViewSelectionMode.FullRowSelect;
```

```VB.NET
RadGridView1.MultiSelect = False
RadGridView1.SelectionMode = GridViewSelectionMode.FullRowSelect
```

To select an item in RadGridView click in the rectangle area of the desired row.

![WinForms RadGridView Basic Selecion](https://www.telerik.com/products/winforms/documentation/assets/53db7eabe518acac703f51e13c0de3c3/gridview-selection-basic-selection001.png)

## Basic Cell Selection

You can modify RadGridView to select single cells instead of rows by setting its **SelectionMode** property to *CellSelect* from the `GridViewSelectionMode` enumeration:

```C#
radGridView1.MultiSelect = false;
radGridView1.SelectionMode = GridViewSelectionMode.CellSelect;
```

```VB.NET
RadGridView1.MultiSelect = False
RadGridView1.SelectionMode = GridViewSelectionMode.CellSelect
```

After setting these properties, to select a cell in RadGridView, click the desired cell.

![WinForms RadGridView Cell Selection](https://www.telerik.com/products/winforms/documentation/assets/a9514ae6949bd21f15b52dc07f50e9db/gridview-selection-basic-selection002.png)

## Selected items

Once an item is selected (row or cell), you can find this item in the **SelectedRows** and **SelectedCells** collections respectively. The following code describes how to access those collections:

```C#
GridViewSelectedRowsCollection selectedRows = radGridView1.SelectedRows;
GridViewSelectedCellsCollection selectedCells = radGridView1.SelectedCells;
```

```VB.NET
Dim selectedRows As GridViewSelectedRowsCollection = RadGridView1.SelectedRows
Dim selectedCells As GridViewSelectedCellsCollection = RadGridView1.SelectedCells
```

## Events

There are two events relevant to the selection: **SelectionChanged**, **CurrentCellChanged**. The sequence of the is as follows – the **CurrentCellChanged** is fired first and after that the **SelectionChangedEvent** event fires.

## CurrentRow/CurrentCell

Once an item is selected, it automatically becomes current (when basic selection is used). This means that if you select the first row (cell) of RadGridView, its **IsCurrent** property will be automatically set to *true* and **CurrentRow** (**CurrentCell**) property of RadGridView will hold an instance of this row (respectively cell). The following example demonstrates how to access the **CurrentRow** and **CurrentCell** properties and additionally the **IsCurrent** property of a row or a cell:

```C#
//gets an instance of the current row
GridViewRowInfo row = radGridView1.CurrentRow;
//gets an instance of the current cell
GridDataCellElement cell = radGridView1.CurrentCell;
//gets or sets if the first row of radGridView1 is current or not
radGridView1.Rows[0].IsCurrent = true;
```

```VB.NET
'gets an instance of the current row
Dim row As GridViewRowInfo = RadGridView1.CurrentRow
'gets an instance of the current cell
Dim cell As GridDataCellElement = RadGridView1.CurrentCell
'gets or sets if the first row of radGridView1 is current or not
RadGridView1.Rows(0).IsCurrent = True
```

When basic selection is used, the opposite is also valid – if you set the **CurrentRow** or **CurrentCell** (or the **IsCurrent** property to true for a cell or row) in RadGridView and only if  basic selection is used (MultiSelect = false ), the selected row(cell) will be the same as the current row(cell).

## See Also

* [Multiple Selection](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/selection/multiple-selection)

* [Selecting Rows and Cells Programmatically](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/selection/selecting-rows-and-cells-programmatically)
