Importing TDBGrid
- 3 minutes to read
This topic describes the properties imported from the standard Delphi TDBGrid to ExpressQuantumGrid. See the Converting to ExpressQuantumGrid document which describes working with the Import dialog and gives general pointers on importing third-party grid controls to the native format of EQGrid.
The converter imports a source TDBGrid into a new Table View represented by the target TcxGridDBTableView class.
The following grid View elements are imported from a TDBGrid control by the Import tool:
the DataSource property
columns and their attributes such as column width, caption, alignment, and visibility status
The type of a column being created is based upon TColumn (a TDBGrid column) properties according to the following table. The column type is assigned via the PropertiesClass property.
The following table describes the column types assigned based on combinations of TColumn properties:
TColumn properties | Column type assigned to a corresponding Tcx |
---|---|
Button Field. | A lookup combo box editor (Tcx |
Button Field. Pick | A combo box editor (Tcx |
Button Field. Pick | A text editor (Tcx |
Button | A button editor (Tcx |
Button (Read Alignment <> ta | A text editor (Tcx |
If your TColumn does not meet any of the conditions listed in this table, then the new column’s type will be exclusively determined by the field type. This is discussed in the FieldName topic of this help system.
- grid options
The next table describes the TDBGrid options imported to ExpressQuantumGrid. The second column specifies the properties of an EQGrid control which are set according to the flags included in the TDBGrid.Options property (unless otherwise indicated, an EQGrid property is set to True or False if a corresponding TDBGrid flag is enabled or disabled, respectively).
Flags enabled in the TDBGrid. | The corresponding EQGrid property |
---|---|
dg | The View’s Options |
dg | The View’s Options This property is set to False, if the flag is enabled. Otherwise, it is set to True. |
dg | The View’s Options |
dg | The View’s Options |
dg | The View’s Options It is set to gl |
dg | The View’s Options |
dg | The View’s Options |
dg | The View’s Options |
dg | The View’s Options |
dg | The View’s Options This property is set to False, if the flag is enabled. Otherwise, it is set to True. |
dg | The View’s Options |
dg | The View’s Options |
- color and font settings
The look & feel of EQGrid is maintained by a number of style properties which identify the background and foreground colors and font attributes specific to particular grid elements. The converter imports the color and font settings of a TDBGrid control as style objects and applies them to the corresponding TcxGrid elements:
Color and font settings of TDBGrid | The corresponding EQGrid style property |
---|---|
TDBGrid. TDBGrid. | The View’s Styles. |
TDBGrid. TDBGrid. | The View’s Styles. |
TColumn. TColumn. | The column’s Styles. |
TColumn. TColumn. | The column’s Styles. |