# Selecting Cells

FlexGrid supports single row and cell selection modes, and also row and cell ranges using the shift key.

## Content



FlexGrid supports selection through the [SelectionMode](/componentone/api/blazor/online-blazor/dotnet-api/C1.Blazor.Grid/C1.Blazor.Grid.FlexGrid.SelectionMode.html) property of the [FlexGrid](/componentone/api/blazor/online-blazor/dotnet-api/C1.Blazor.Grid/C1.Blazor.Grid.FlexGrid.html) class. This property determines how the cell or rows are selected in grid. The **SelectionMode** property sets the selection behavior through [GridSelectionMode](/componentone/api/blazor/online-blazor/dotnet-api/C1.Blazor.Grid/C1.Blazor.Grid.GridSelectionMode.html) enumeration. This enumeration specifies the following values to define the selection behavior:

| **Selection Mode** | **Image** | **Description** |
| --- | --- | --- |
| Cell |   ![Single Cell Selection](https://cdn.mescius.io/document-site-files/images/f5b600ba-f1a7-4f89-a20c-aa6c0c35880d/images/cell_selection.png)  Single Cell Selection     | Cell selection allows you to select a single cell and perform data operations like copy, paste, print etc. |
| CellRange |   ![Cell Range Selection](https://cdn.mescius.io/document-site-files/images/f5b600ba-f1a7-4f89-a20c-aa6c0c35880d/images/cellrange_selection.png)  Cell Range Selection     | Cell range selection allows you to select multiple cells using the mouse while holding Shift key. |
| Row |   ![Single Row Selection](https://cdn.mescius.io/document-site-files/images/f5b600ba-f1a7-4f89-a20c-aa6c0c35880d/images/row_selection.png)  Single Row Selection     | Row selection option allows you to select a single row from the grid and perform operations. |
| RowRange |   ![Row Range Selection](https://cdn.mescius.io/document-site-files/images/f5b600ba-f1a7-4f89-a20c-aa6c0c35880d/images/rowrange_selection.png)  Row Range Selection     | RowRange selection allows you to select multiple rows using the mouse while holding Shift key. |
| Column |   ![Column Selection](https://cdn.mescius.io/document-site-files/images/f5b600ba-f1a7-4f89-a20c-aa6c0c35880d/images/column-selection.png)  Column Selection     | Column selection allows you to select a set of contiguous columns. |
| ColumnRange |   ![ColumnRange Selection](https://cdn.mescius.io/document-site-files/images/f5b600ba-f1a7-4f89-a20c-aa6c0c35880d/images/columnrange_selection.png)  ColumnRange Selection     | ColumnRange selection allows you to select a set of contiguous columns. |
| MultiRange |   ![MultiRange Selection](https://cdn.mescius.io/document-site-files/images/f5b600ba-f1a7-4f89-a20c-aa6c0c35880d/images/multirange-selection.png)  MultiRange Selection     | MultiRange selection allows you to select a set of collection of ranges. |
| ListBox |   ![ListBox Selection](https://cdn.mescius.io/document-site-files/images/f5b600ba-f1a7-4f89-a20c-aa6c0c35880d/images/list-box-selection.png)  ListBox Selection     | ListBox selection allows you to select non-contiguous rows by ctrl+clicking. |
| MultiColumns |   ![MultiColumns Selection](https://cdn.mescius.io/document-site-files/images/f5b600ba-f1a7-4f89-a20c-aa6c0c35880d/images/multicolumns-selection.png)  MultiColumns Selection     | MultiColumn selection allows you to select non-contiguous rows by ctrl+clicking. |

The following example demonstrates how to set the selection mode in FlexGrid. This example uses the Customer.cs class available in the BlazorExplorer product sample.

```razor
@page "/"
@using System.Collections.ObjectModel;
@using C1.Blazor.Grid
<FlexGrid ItemsSource="@customers" SelectionMode="GridSelectionMode.MultiRange"></FlexGrid>
@code {
    ObservableCollection<Customer> customers;
    protected override void OnInitialized()
    {
        customers = Customer.GetCustomerList(10);
    }
}    
```