[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Exchanges the positions for the specified columns.
Source position: grids.pas line 657
protected procedure TGridColumns.ExchangeColumn( |
Index: Integer; |
WithIndex: Integer |
); |
Index |
|
Position of a column exchanged in the method. |
WithIndex |
|
Position of the other column exchanged in the method. |
ExchangeColumn is a method used to swap the positions for the grid columns specified in the Index and WithIndex parameters. The arguments contain the ordinal positions for the respective grid columns in Items that are swapped in the method.
ExchangeColumn calls HasIndex to ensure that both values within the range allowed (0..Count-1). An exception is raised if either value is not in the required range for the column collection.
The order for the index positions is not significant; the column with the larger of the two index values is updated first. This prevents an exception from being raised when the column positions are swapped.
ExchangeColumn swaps the values for the Index properties for the corresponding TGridColumn instances in Items. The Grid control associated with the collection is notified when the Index properties are updated, and the grid moves the content for the updated columns.
Raises an Exception if values in Index or WithIndex are not within the range allowed for the collection.
|
Provides indexed access to column definitions in the collection. |
|
|
The Grid which owns the collection and columns. |
|
|
Implements a column definition used for tabular data in TCustomGrid. |
|
|
Implements the base class for grid controls. |
|
Version 4.0 | Generated 2025-05-03 | Home |