1

With a customer I'm stuck developing for this very old version (2.1) of ExpressQuantumGrid by DevExpress. In Delphi 4. I can't find any documentation about it.

Basically I just need to create a bunch of TdxDBGridMaskColumn and "insert" them into the grid (TdxDBGrid) at runtime. From the code completion pop-up I can't figure out how.

Thanks!

RRUZ
  • 134,889
  • 20
  • 356
  • 483
Kaze no Koe
  • 3,254
  • 1
  • 21
  • 22

1 Answers1

0

We have an old app that uses Delphi 5 and DevExpress v3, the code might not be identical but should get you started.

A function that can create a column of any type (TdxDBDateColumn for example):

function CreateColumn(const aField: string; aColClass: TdxDBTreeListColumnClass): TdxDBTreeListColumn;
var
begin
  Result := dxGrid.CreateColumn(aColClass);
  Result.Name := dxGrid.Name + aField;
  TdxDBGridColumn(Result).DisableFilter := True;
  TdxDBGridColumn(Result).DisableGrouping := True;
  TdxDBGridColumn(Result).Alignment := taRightJustify;
  TdxDBGridColumn(Result).FieldName := aField;
  TdxDBGridColumn(Result).Caption := aField;
  TdxDBGridColumn(Result).Width := 70;
end;

Then you can call this function like so:

NewColumn := CreateColumn('Username', TdxDBGridColumn);
SteB
  • 1,999
  • 4
  • 32
  • 57