Library Vcl NextSuite 6 NextDBGrid6 Reference Classes TNextDBGrid6 OnAddFieldQuery

OnAddFieldQuery

Event that is being called if aoAutoAddFields option is set in ActivationOptions property. This event is called for each field inside a linked DataSet.

pas
property OnAddFieldQuery: TNxAddFieldQueryEvent read FOnAddFieldQuery write FOnAddFieldQuery;

Field
TField
Field being added.

ColumnClass
TNxColumnClass
Class of column which will be added. The value can be changed and other column type (meta class) can be specified.

Accept
Boolean
Specifies whether Field will be added or ignored. Default value is True, but the value can be changed.

Example

pas
procedure TForm1.NextDBGrid61AddFieldQuery(Sender: TObject; Field: TField;
  var ColumnClass: TNxColumnClass; var Accept: Boolean);
begin
  if Field.FieldName = 'Progress' then
  begin
    Field.DisplayLabel := 'Header Caption';
    ColumnClass := TNxDBTrackbarColumn6;
  end;
end;

Sign in