Steema Documentation / TeeBI VCL/FMX / Tutorials



Any TDataItem (and its children items, sub-items and master-detail related data items) can be visualized using a "grid" control.

The BI.VCL.Grid and BI.FMX.Grid units implement a container control for a "real" grid.

The default Grid control used to display data is the VCL TDBGrid and the Firemonkey TGrid.

Other grid controls can be easily selected, currently being:

  • JVCL Grid ( )
  • SMDBGrid (VCL )
  • TMS Grid for Firemonkey ( )
  • Woll2Woll FirePower grid ( )

The TBIGrid container control is configured by default to enable sorting and filtering by mouse-clicking the grid column headers, using the standard VCL and FMX grid controls included in Delphi.

Other grids might support more advanced features, accessible via this property:

var JGrid : TJVDBGrid;
JGrid := BIGrid1.Plugin.GetControl as TJVDBGrid;

Selecting a grid is done by setting the Plugin property, for example:

BIGrid1.Plugin := TBIJVCLGridPlugin.Create(BIGrid1);

A TDataItem can be displayed onto a BIGrid at runtime in different ways:

-by setting the Data property:

BIGrid1.Data := MyDataItem;

-by setting the DataSource property linked to a BIDataset:

BIDataset1.Data:= MiDataItem;
DataSource1.DataSet:= BIDataset1;

-Calling the BIGrid BindTo method:


At design-time, the BIGrid Data property can be changed in the Object Inspector, using the Data Manager dialog to select the desired store (local or remote), and the data item to visualize.

Grid Colorizer

A feature of TBIGrid (beta note: VCL only) allows defining a formula to fill the grid cells interior with a color calculated using all cells of a given range.

Several properties allow customizing the number of colors, changing the text font color for better readibility or inverting the formula.

uses BI.UI;
var MyColors : TDataColorizer;
MyColors.Data:= SumOfQuantity;  // <-- The selected TDataItem
BIGrid1.Colorize([ MyColors ]);   // <-- array with one or more items

// optional properties:

MyColors. TextColor:= TColorizeTextColor.Automatic;
MyColors.Inverted:= False;

For each "colorizer", the minimum and maximum values of the Data item will be calculated and then each cell value determines the interpolated color used to fill the cell.