Developer

OnAddFieldQuery

Occur before each TField is added as new Column into Grid (when TDataSet is open, and there are no existing columns added).

property OnAddFieldQuery: TNxAddFieldQueryEvent read FOnAddFieldQuery write FOnAddFieldQuery;
ColumnClass and Accept parameters can be modified.

Parameters


Field
TField
Field being added.
ColumnClass
TNxColumnClass
Class of column which will be added.
Accept
Boolean
Specifies whether Field will be added (or skipped).

Example:


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;

See also