Spread WPF 17
Spread WPF Documentation / Developer's Guide / Using Touch Support with the Component / Using Touch Support / Using Touch Support with Selections
In This Topic
    Using Touch Support with Selections
    In This Topic

    You can select columns, rows, cell ranges, and the entire control using touch gestures.

    Tap a cell to select the cell and display the selection gripper. Press the cell selection gripper and slide. Release to select a cell range. The following image displays a selected cell range.

    Selecting cell range using selection grippers

    Tap a column header (or row header) to select a column (or row). You can then press the selection gripper and slide to select a column range (or row range). Release to complete the selection. You can also select a column or row range by tapping a header and then sliding in the header area. Release to complete the selection.

    You can select the entire control by tapping the corner header.

    You can change the size of the cell range selection by pressing the selection gripper and sliding in any direction. Release to complete the action.

    You can select multiple ranges. Select a range, then tap a cell in a different location to start the next selection. Use the gripper to select the second range.

    The SelectionPolicy property must be set to MultiRange and the CanTouchMultiSelect property must be true.

    The selection grippers are displayed on the outside edge of the range (top-left and bottom-right edges, by default). You can customize the gripper appearance using the TouchSelectionGripperBackgroundColor or TouchSelectionGripperBackgroundThemeColor property.

    Using Code

    The following example sets the gripper color and allows multiple selections.

    CS Copy Code
    GcSpreadSheet1.Sheets[0].SelectionPolicy = GrapeCity.Windows.SpreadSheet.Data.SelectionPolicy.MultiRange;
    GcSpreadSheet1.CanTouchMultiSelect = true;
    //GcSpreadSheet1.Sheets[0].TouchSelectionGripperBackgroundColor = System.Windows.Media.Colors.Red;
    GcSpreadSheet1.Sheets[0].TouchSelectionGripperBackgroundThemeColor = "Accent 3 40";
    //GcSpreadSheet1.Sheets[0].ResetTouchSelectionGripperBackgroundColor();
    //GcSpreadSheet1.Sheets[0].ResetTouchSelectionGripperBackgroundThemeColor();
    VB.NET Copy Code
    GcSpreadSheet1.Sheets(0).SelectionPolicy = GrapeCity.Windows.SpreadSheet.Data.SelectionPolicy.MultiRange
    GcSpreadSheet1.CanTouchMultiSelect = True
    'GcSpreadSheet1.Sheets(0).TouchSelectionGripperBackgroundColor = System.Windows.Media.Colors.Red
    GcSpreadSheet1.Sheets(0).TouchSelectionGripperBackgroundThemeColor = "Accent 3 40"
    'GcSpreadSheet1.Sheets(0).ResetTouchSelectionGripperBackgroundColor()
    'GcSpreadSheet1.Sheets(0).ResetTouchSelectionGripperBackgroundThemeColor()
    See Also