diff --git a/GridControlWithExtendedRowSelectionMode.png b/GridControlWithExtendedRowSelectionMode.png new file mode 100644 index 0000000..73e1bd5 Binary files /dev/null and b/GridControlWithExtendedRowSelectionMode.png differ diff --git a/GridControlWithMultipleRowSelectionMode.png b/GridControlWithMultipleRowSelectionMode.png new file mode 100644 index 0000000..3f33cb3 Binary files /dev/null and b/GridControlWithMultipleRowSelectionMode.png differ diff --git a/GridControlWithMultipleSelectionMode.png b/GridControlWithMultipleSelectionMode.png new file mode 100644 index 0000000..8afcb45 Binary files /dev/null and b/GridControlWithMultipleSelectionMode.png differ diff --git a/GridControlWithOneSelectionMode.png b/GridControlWithOneSelectionMode.png new file mode 100644 index 0000000..1f5bef2 Binary files /dev/null and b/GridControlWithOneSelectionMode.png differ diff --git a/README.md b/README.md index bab67cd..373e885 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,133 @@ -# WPF-GridControl-Selection -This repository contains the samples which shows the different selection of WPF GridControl. +# WPF GridControl Selection + +This repository contains the samples which shows the different selection of [WPF GridControl](https://www.syncfusion.com/wpf-controls/excel-like-grid). + +## Selection modes +There are two modes of selection available in the GridControl. They are, + +* Range selection +* Record selection + +### Range selection +1. In Range selection, you will be able to select cell ranges; but the selections will have no knowledge of nested tables, grouping or sorting and hence the functionality is limited like a data bound grid (GridData control). +2. To use the model selection capability, set AllowSelections to any flag except none. +3. Selection can be made through keyboard and mouse. + +### Record selection +1. It is designed specifically for the data bound grids. +2. In Record selection, the complete grid records (rows) will be selected and these selections function properly with nested tables, sorting, and so on. +3. To use the record selections, you must set AllowSelections to none and then set ListBoxSelectionMode to any flag except none. +4. Selection can be made through keyboard and mouse with some restriction. For more details, see Record-based Selection in this topic. + +## Range selection +Range selection is a cell-based selection mode that allows you to do a selection across the cell by using the [AllowSelection](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Grid.GridModelOptions.html#Syncfusion_Windows_Controls_Grid_GridModelOptions_AllowSelection) property. It accepts value from [GridSelectionFlags](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Grid.GridSelectionFlags.html) enumeration. Default value for `AllowSelection` is `Any` and the specified range of Cell/Row/Column or Table can be highlighted using the range section. + +The possible values for this type of selection are defined by the enum `GridSelectionFlags`. To control the selection behavior of the grid, set any of the following flags to the AllowSelection property. + +### Selection flags + +
| +Flag | +Description |
|---|---|
| +None | +Disables selecting of cells. |
| +Row | +Allows selection of rows. |
| +Column | +Allows selection of columns. |
| +Table | +Allows selection of the whole table. |
| +Cell | +Allows selection of an individual cell. |
| +Multiple | +Allows selection of multiple ranges of cells. The user has to press CTRL Key to select multiple ranges. |
| +Shift | +Allows extending existing selection when user holds SHIFT Key and clicks on a cell. |
| +Keyboard | +Allows extending existing selection when user holds SHIFT Key and presses arrow keys. |
| +MixRangeType | +Allows both rows and columns to be selected at the same time when Multiple is specified. By default, the grid does not allow row and column ranges to be selected at the same time. |
| +Any | +Allows selection of rows, columns, table, cell and multiple ranges of cells; also extends SHIFT Key support and alpha blending. |