Skip to main content

TcxCustomGrid.Levels Property

Provides access to the collection of root grid levels within a grid control.

Declaration

property Levels: TcxGridLevel read; write;

Property Value

Type
TcxGridLevel

Remarks

Use the Levels property to access the collection of root grid levels within a grid control. Each grid level in turn may contain child levels, thus constructing a data hierarchy. To access child grid levels, use the TcxGridLevel.Items property. To access the currently active root grid level, use the ActiveLevel property.

The following code iterates the child levels of the first root grid level and disables filtering for the associated grid Views (but ignores Card Views).

var
  I: Integer;
  AGridView: TcxCustomGridView;
//...
  for I := 0 to cxGrid1.Levels[0].Count - 1 do
  begin
    AGridView := cxGrid1.Levels[0].Items[I].GridView;
    if AGridView is TcxGridTableView then
      TcxGridTableView(AGridView).OptionsCustomize.ColumnFiltering := False;
  end;
See Also