[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomGrid.ClearSelections

Clears the current range selection(s) and redraws the grid control.

Declaration

Source position: grids.pas line 1343

public procedure TCustomGrid.ClearSelections;

Description

ClearSelections is a method used to remove all selection rectangles in an internal member for the grid control. These are the values stored using AddSelectedRange when multi-selection is enabled in the Options for the control.

ClearSelections calls UpdateSelectionRange to restore the current selection using the values in Col and Row. When goRowSelect has been included in Options, a range selection for all cells in the current row is created. The pivot point for extending the range selection is set to the values in Col and Row.

ClearSelections calls InvalidateGrid to redraw the grid control when another update is not already in progress.

ClearSelections is called when a new value is assigned to the RangeSelectMode property. It is also called from the MouseDown method when a range selection is handled for the non-fixed area in the grid control.

See also

TCustomGrid.Options

  

Contains the set of optional features and/or behaviors enabled for the grid control.

TCustomGrid.Col

  

Column index for the selected grid cell.

TCustomGrid.Row

  

Row number for the selected grid cell.

TCustomGrid.RangeSelectMode

  

Controls the range selection mode used for the grid.

TCustomGrid.AddSelectedRange

  

Adds the current range selection to the array of selection rectangles for the control.

TCustomGrid.UpdateSelectionRange

  

Updates the selection range when the current selection in the grid has changed.

TCustomGrid.InvalidateGrid

  

Invalidates the client area for the grid control.

TCustomGrid.MouseDown

  

Handles mouse down events for the grid control.


Version 4.0 Generated 2025-05-03 Home