Syncfusion.Grid.Grouping.Windows


AllowSelection Property (GridTableOptionsStyleInfo)

Defines selection behavior of the grid. When you set this property GridSelectionFlags.None and specify ListBoxSelectionMode then a record-based selection mechanism is used. If you set this property to a value different from GridSelectionFlags.None a 2.x version compatible selection mechanism is used.
Syntax
'Declaration
 
<DescriptionAttribute("Defines selection behavior of the grid.")>
<EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="Syncfusion.Windows.Forms.Design.EnumFlagsEditor, Syncfusion.Shared.Base, Version=17.1460.0.47, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89")>
<NotifyParentPropertyAttribute(True)>
Public Property AllowSelection As GridSelectionFlags
'Usage
 
Dim instance As GridTableOptionsStyleInfo
Dim value As GridSelectionFlags
 
instance.AllowSelection = value
 
value = instance.AllowSelection
[Description("Defines selection behavior of the grid.")]
[Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="Syncfusion.Windows.Forms.Design.EnumFlagsEditor, Syncfusion.Shared.Base, Version=17.1460.0.47, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89")]
[NotifyParentProperty(true)]
public GridSelectionFlags AllowSelection {get; set;}

Property Value

A Syncfusion.Windows.Forms.Grid.GridSelectionFlags that specifies options to be applied.
Remarks
Starting version 3.x the GridGroupingControl now supports multiple record selection and navigation across nested tables. In order to use the new record selection mechanism you need to set TableOptions.ListBoxSelection = SelectionMode.XYZ and make sure that TableOptions.AllowSelection = GridSelectionFlags.None. Optional settings can be specified with TableOptions.ListBoxSelectionColorOptions and TableOptions.ListBoxSelectionCurrentCellOptions.

With the new record-based selection mode selected records can be found in Table.SelectedRecords collection.

If you specify a different value for TableOptions.AllowSelection other than GridSelectionFlags.None the grid will operate in a backward-compatible mode and continue to use the old selection mechanism that was in place with 2.x and 1.x versions of the GridGroupingControl.

Use TableOptions.AllowSelection only if you explicitly want the old selection behavior, e.g. if you want to be able to select individual cells or want to use Excel-like selection behavior.

With the backward compatible selection mode selected rows and cells can be found in TableModel.Selections.Ranges collection.

AssemblyVersion

Syncfusion.Grid.Grouping.Windows: 17.1460.0.47

See Also