RAD Studio
ContentsIndex
PreviousUpNext
Deleting Persistent Columns

Deleting a persistent column from a grid is useful for eliminating fields that you do not want to display.

To remove a persistent column from a grid

  1. Double-click the grid to display the Columns editor.
  2. Select the field to remove in the Columns list box.
  3. Click Delete (you can also use the context menu or Del key, to remove a column).
Note: If you delete all the columns from a grid, the Columns.State property reverts to its csDefault state and automatically build dynamic columns for each field in the dataset.
You can delete a persistent column at runtime by simply freeing the column object:

DBGrid1.Columns[5].Free;

 

delete DBGrid1->Columns->Items[5];
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!