GST Billing Software

header image

Set Associated Column for a Datagrid

Erachana Line

32. How to set associated column for a datagrid?

Normally, when the Form is created, table columns get associated with columns on the grid. But some- times, there is a need to manually associate the table column. The scenarios where such a need occurs are -

1. When the database table or column name gets altered

2. When the Table Column data type gets changed

3. When new columns are added to the Table

4. When Table columns are removed

To do so, select the datagrid, in Properties Tab, Misc. Section, select 'Columns' property and click 'Collection'. In the TGridColumnCollectionEditor that opens, you can add, remove or modify datagrid columns. In Members List, select the required Column, and in Properties List, in Misc. section, in 'AssociatedColumn' property, add the desired column name which is in the table.