Tips and Frequently Asked Questions

Doing custom dataset filtering in TDBAdvGrid from the filter edit row
Default, the grid performs built-in filtering of data. It can be desirable to not use the built-in grid filtering but instead perform the filtering directly on the dataset but still use the filter edit UI to enter the filter condition.
To perform the dataset filtering, implement the OnFilterEditUpdate and from this event, set the flag grid.DoAutoEditFilter = false. When this flag is set false, the OnFilterEditDone event will be triggered from where the code can be added to specify the filter.
Example implementation in code with a grid bound to a TADOQuery dataset assuming the filter condition is set in the filter UI for the ''BRAND'' or ''TYPE'' field in the dataset:
procedure TForm1.FormCreate(Sender: TObject); begin adoquery1.SQL.Text := ''SELECT * FROM CARS''; adoquery1.Active := true; dbadvgrid1.FilterEdit.Enabled := true; end; end; procedure TForm1.DBAdvGrid1FilterEditDone(Sender: TObject; ACol: Integer; Condition: string; FilterType: TFilterType); begin //event is triggered when built-in filtering is not used and from here custom dataset filtering can be done if ACol = BrandColumn then adoquery1.SQL.Text := ''SELECT * FROM CARS WHERE BRAND LIKE ''''''+ Condition+''''''''; if ACol = TypeColumn then adoquery1.SQL.Text := ''SELECT * FROM CARS WHERE TYPE LIKE ''''''+ Condition+''''''''; adoquery1.Active := true; end; procedure TForm1.DBAdvGrid1FilterEditUpdate(Sender: TObject; ACol: Integer; Condition: string; FilterType: TFilterType); begin //just set the flag that built-in filtering will not be used DBAdvGrid1.DoAutoEditFilter := false; end;
Pricing
Single Developer License
Small Team License
Site License
TMS VCL UI Pack
€ 395
€
175
yearly renewal
license for 1 developer
Includes
check
Full source code
check
Access to the TMS Support Center
check
Free updates and new releases
MOST POPULAR
TMS VCL Subscription
€ 895
€
450
yearly renewal
license for 1 developer
Includes
check
Full source code
check
Access to the TMS Support Center
check
Free updates and new releases
check
TMS VCL UI Pack
check
All TMS VCL products
more_horiz
Discover more
BEST VALUE
TMS ALL-ACCESS
€ 1,795
€
595
yearly renewal
license for 1 developer
Includes
check
Full source code
check
Access to the TMS Support Center
check
Free updates and new releases
check
TMS VCL UI Pack
check
All TMS VCL products
check
All TMS products
more_horiz
Discover more
All prices excl. VAT. Renewal price is subject to change and only valid up to 30 days after license has expired. After renewal period a discount price is offered to renew the license.
Free Trial
Start a free TMS VCL UI Pack evaluation today!Please enter a valid email address
Download started. Your trial key will be provided by email!
By entering your email address you agree to receive email messages from TMS Software.

Note that the TMS VCL UI Pack replaces the TMS Component Pack. Both products can't be installed simultaneously. Therefore TMS Component Pack must first be uninstalled before installing the TMS VCL UI Pack