ColumnStatesToString problem

From the TDBAdvGrid PDF developers guide:


To get started with TDBAdvGrid, the easiest way is to drop a TDataSource on the form and connect
it to a TDataSet of choice. Activate the dataset and connect the TDataSource to TDBAdvGrid. With
the default setting of TDBAdvGrid.AutoCreateColumns as true, the grid will automatically create
TDBGridColumnItem instances for every DB field in the dataset and add it to the Columns collection.
The TDBGridColumnItem.FieldName will be initialized with the fieldnames found in the dataset
Fields collection. When TDBAdvGrid.AutoRemoveColumns is set to true, deactivating the dataset
will automatically remove all columns from the grid.