RAD Studio |  |

Arranging the Order of Persistent Columns
See Also
Collapse All

The order in which columns appear in the Columns editor is the same as the order the columns appear in the grid. You can change the column order by dragging and dropping columns within the Columns list box.

To change the order of a column

1. Select the column in the Columns list box.
2. Drag it to a new location in the list box.

You can also change the column order at runtime by clicking on the column title and dragging the column to a new position.
Note: Reordering persistent fields in the Fields editor also reorders columns in a default grid, but not a custom grid.
Warning: You cannot reorder columns in grids containing both dynamic columns and dynamic fields at design time, since there is nothing persistent to record the altered field or column order.
At runtime, a user can use the mouse to drag a column to a new location in the grid if its DragMode property is set to dmManual. Reordering the columns of a grid with a State property of csDefault state also reorders field components in the dataset underlying the grid. The order of fields in the physical table is not affected. To prevent a user from rearranging columns at runtime, set the grid's DragMode property to dmAutomatic.

At runtime, the grid's OnColumnMoved event fires after a column has been moved.

See Also

Creating Persistent Columns

Deleting Persistent Columns

Defining a Lookup List Column

Putting a Button in a Column

Setting Column Properties at Design Time

Restoring Default Values to a Column

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!