GrapeCity MultiRow Windows Forms Documentation
AllowUserToShiftSelect Property
Example 


Gets or sets a value that indicates whether to allow a user to select a range of cells or rows with the keyboard or mouse click when pressing the shift key.
Syntax
<SRCategoryAttribute("Behavior")>
<SRDescriptionAttribute("Indicates whether to allow the user to select a range of cells or rows using the keyboard or mouse click when pressing the Shift key.")>
<DefaultValueAttribute()>
Public Property AllowUserToShiftSelect As Boolean
Dim instance As GcMultiRow
Dim value As Boolean
 
instance.AllowUserToShiftSelect = value
 
value = instance.AllowUserToShiftSelect
[SRCategory("Behavior")]
[SRDescription("Indicates whether to allow the user to select a range of cells or rows using the keyboard or mouse click when pressing the Shift key.")]
[DefaultValue()]
public bool AllowUserToShiftSelect {get; set;}

Property Value

true to allow the user to select a range of cells or rows with the keyboard or mouse click when pressing the shift key; otherwise, false. The default is false.
Remarks

In the EditingActions class, there are actions for shift select keyboard actions, such as SelectionActions.ShiftUp, SelectionActions.ShiftDown, and so on. You can change the selected range with shortcut keys, such as Shift+Up and Shift+Down if the ShortcutKeyManager uses the default setting and this property's value is true.

If the MultiSelect property is false, shift selection actions are disabled.

Shift selection actions do not take effect when the ViewMode property value is ViewMode.Display or ViewMode.ListBox.

The shift selection policy is similar to a standard grid or spreadsheet. Shift selection is not recommended when the template is very complex.
Example
The following code example shows how to use this property to customize the selection behavior. This code example is part of a larger example provided for the ViewMode class.
void allowShiftSelectCheckBox_CheckedChanged(object sender, EventArgs e)
        {
// When allowing shift select, user can select a range by pressing shift key and navigation key or clicking left 
// mouse button.
            this.gcMultiRow1.AllowUserToShiftSelect = allowShiftSelectCheckBox.Checked;
        }
Private Sub allowShiftSelectCheckBox_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles 
allowShiftSelectCheckBox.CheckedChanged
        ' When allowing shift select, user can select a range by pressing shift key and navigation key or clicking left 
        ' mouse button.
        Me.gcMultiRow1.AllowUserToShiftSelect = allowShiftSelectCheckBox.Checked
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GcMultiRow Class
GcMultiRow Members

 

 


Copyright © GrapeCity, inc. All rights reserved.