windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsselection-5db7c04c.md
Gets or sets whether multiple cells or rows can be selected.
Namespace : DevExpress.XtraGrid.Views.Grid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DefaultValue(GridMultiSelectMode.RowSelect)]
[XtraSerializableProperty]
public virtual GridMultiSelectMode MultiSelectMode { get; set; }
<DefaultValue(GridMultiSelectMode.RowSelect)>
<XtraSerializableProperty>
Public Overridable Property MultiSelectMode As GridMultiSelectMode
| Type | Default | Description |
|---|---|---|
| GridMultiSelectMode | RowSelect |
A GridMultiSelectMode enumeration value which specifies whether multiple cells or rows can be selected.
|
Available values:
| Name | Description |
|---|---|
| RowSelect |
Multiple rows can be selected via the mouse and keyboard. Individual cells cannot be selected.
| | CellSelect |
Individual cells and blocks of cells can be selected. This option is not supported in Advanced Banded Grid Views.
| | CheckBoxRowSelect |
Multiple rows can be selected via the mouse, keyboard and built-in Check column (which displays check boxes in each row). Individual cells cannot be selected.
|
You can access this nested property as listed below:
| Object Type | Path to MultiSelectMode |
|---|---|
| GridView |
.OptionsSelection .MultiSelectMode
|
Multiple row (cell) selection is allowed, and therefore the MultiSelectMode property is in effect if the ColumnViewOptionsSelection.MultiSelect property is set to true.
gridView1.OptionsSelection.MultiSelect = true;
gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect;
GridView1.OptionsSelection.MultiSelect = True
GridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect
See the following topics for more information:
DevExpress WinForms: Web Style Row Selection.
The following code snippets (auto-collected from DevExpress Examples) contain references to the MultiSelectMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-grid-multi-cell-editing/CS/Form1.cs#L24
gridView1.OptionsSelection.MultiSelect = true;
gridView1.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect;
behaviorManager1.Attach<MultiCellEditBehavior>(gridView1);
winforms-mvvm-expenses-app/CS/MVVMExpenses/Views/Account/AccountsView.cs#L23
gridView1.OptionsSelection.MultiSelect = true;
gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect;
}
winforms-grid-move-cell-using-drag-drop/CS/Form1.cs#L20
gridView1.OptionsSelection.MultiSelect = true;
gridView1.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect;
gridControl1.DataSource = CreateTable(20, 20);
winforms-grid-drag-and-drop-selected-rows/CS/Form1.cs#L27
view.OptionsSelection.MultiSelect = true;
view.OptionsSelection.MultiSelectMode = GridMultiSelectMode.RowSelect;
view.SelectRange(3, 7);
winforms-grid-copy-cell-value-to-other-cells-by-dragging-its-right-bottom-edge/CS/Form1.cs#L22
gridView1.OptionsSelection.MultiSelect = true;
gridView1.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect;
new DataSourceHelper(gridView1, 50, 50);
winforms-grid-multi-cell-editing/VB/Form1.vb#L25
gridView1.OptionsSelection.MultiSelect = True
gridView1.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect
behaviorManager1.Attach(Of MultiCellEditBehavior)(gridView1)
winforms-mvvm-expenses-app/VB/MVVMExpenses/Views/Account/AccountsView.vb#L26
gridView1.OptionsSelection.MultiSelect = True
gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect
End Sub
winforms-grid-move-cell-using-drag-drop/VB/Form1.vb#L19
gridView1.OptionsSelection.MultiSelect = True
gridView1.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect
gridControl1.DataSource = CreateTable(20, 20)
winforms-grid-drag-and-drop-selected-rows/VB/Form1.vb#L34
view.OptionsSelection.MultiSelect = True
view.OptionsSelection.MultiSelectMode = GridMultiSelectMode.RowSelect
view.SelectRange(3, 7)
winforms-grid-copy-cell-value-to-other-cells-by-dragging-its-right-bottom-edge/VB/Form1.vb#L22
gridView1.OptionsSelection.MultiSelect = True
gridView1.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect
Dim tempVar As New DataSourceHelper(gridView1, 50, 50)
See Also