Skip to main content

TcxGridLevel Class

Encapsulates the concept of grid level within a grid control.

Declaration

TcxGridLevel = class(
    TcxComponent,
    IdxScaleFactor
)

Remarks

The TcxGridLevel class introduces properties and methods which support the hierarchical representation of data within a grid control. Levels are mostly used to create master-detail relations between tables. To present a master-detail relation between two tables, you need to create two levels (the second level must be a child of the first level), associate a grid View (a TcxCustomGridView descendant) with each level and link tables via the DataController property of a View object. Grid levels created in this manner are placed at different nesting levels. The grid control also enables you to place several grid levels (Views) at the same nesting level, thus supporting multiple details for one master table.

The following image shows a grid control with three grid levels. Grid Level 2 and Grid Level 3 are children of Grid Level 1. In other words, these grid levels are placed at two different nesting levels.

Grid Level 1 represents data from the Orders table. Grid Level 2 and 3 are associated with the Views retrieving data from the Customer and Employee tables respectively. The Employee and Orders tables are linked by the EmpNo field. The Customer and Orders tables are linked by the CustNo field.

A grid control allows the displaying of several grid levels (Views) and you can switch between them.

A grid control contains the Levels property of class TcxGridLevel, thus providing you access to root grid levels. Each level can have children. To access child levels use the Items property.

A level itself merely provides the hierarchy. You assign a View to it in order to retrieve data from a particular data storage and represent it in a specific form (table, banded table, card, etc.).

Implements

See Also