dkeene Posted September 11, 2020 Posted September 11, 2020 Hello I am trying to use RemoteQuery on a DBComboBox to build a query based on the value of the DBComboBox's textbox as a user types some keys. Instead of using the event: DBComboBox.OnChange(Sender: TObject) to process the request, i will set property RemoteQuery to True, and will now use uniDBComboBoxRemoteQuery(const QueryString: string; Result: TStrings); to grab the value of QueryString and build an SQL statement. However, unlike OnChange(Sender: TObject), now I don't have any knowledge of which control is triggering this event. Is there any way of grabbing the sender of this event and why is it not included in as something like DBComboBoRemoteQuery(Sender: TObject; const QueryString: string; Result: TStrings); Please help Thanks Doug Quote
dkeene Posted September 11, 2020 Author Posted September 11, 2020 Perhaps one could use the form's ActiveControl property, but I try during the procedure TForm.DBComboboxRemoteQuery(const QueryString: string; result: TStrings); begin if self.ActiveControl is UniDBCombobox then begin ....do something end; end Despite the control that triggers this event, Self.ActiveControl is nil... Any thoughts?> Doug Quote
dkeene Posted September 14, 2020 Author Posted September 14, 2020 Any thoughts on this? Thank you Douglas Quote
PS1 Posted January 22, 2024 Posted January 22, 2024 Any ideas here? I need that solution too. 😕 Quote
Sherzod Posted January 22, 2024 Posted January 22, 2024 To be precise, what exactly is the issue? Quote
PS1 Posted January 22, 2024 Posted January 22, 2024 Issue was to have sender(DBComboBox) so you just can write one function in which you can use (sender as TUniDBComboBox)... . i found solution already, there is second event called: RemoteQueryEx(Sender: TComponent; const QueryString: string; Result: TStrings); where the sender is given. Quote
Sherzod Posted January 22, 2024 Posted January 22, 2024 2 minutes ago, PS1 said: RemoteQueryEx Yes. This has been added! 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.