The Final Result thanks to CGD support.
Hope this will be helpful to others.
Scenario: I need multiple auto-search components is a dialog to operate on the same DB table. There are approx 2 million records in table.
There is a data grid that displays the retrieved data.
I placed 4 AutoComplete components in a dialog.
None of the AutoComplete components are connected to the database (i.e. no DataLink)
Each AutoComplete has a OnGetAutoCompleteDataEx event similar to as follows:
- Code: Select all
procedure TiwfrmMain.iwcgjqtcmpltSurnameGetAutoCompleteDataEx(Sender: TObject; const ATerm: string; AData: TStrings);
begin
gv_Surname := ATerm;
DoSearch; // Call the procedure to perform the data retreival
end;
All AutoComplete components are linked to the same Event JQAutoCompleteOptions OnSearch
- Code: Select all
procedure TiwfrmMain.iwcgjqtcmpltSurnameJQAutoCompleteOptionsSearch(Sender: TObject; AParams: TStringList);
begin
iwcgjqgrdResultGrid.JQGridOptions.ReloadGrid;
end;
Works really well and fast.
Regards,