dkeene Posted September 11, 2020 Share 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 Link to comment Share on other sites More sharing options...
dkeene Posted September 11, 2020 Author Share 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 Link to comment Share on other sites More sharing options...
dkeene Posted September 14, 2020 Author Share Posted September 14, 2020 Any thoughts on this? Thank you Douglas Quote Link to comment Share on other sites More sharing options...
PS1 Posted January 22 Share Posted January 22 Any ideas here? I need that solution too. 😕 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22 Share Posted January 22 To be precise, what exactly is the issue? Quote Link to comment Share on other sites More sharing options...
PS1 Posted January 22 Share Posted January 22 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 Link to comment Share on other sites More sharing options...
Sherzod Posted January 22 Share Posted January 22 2 minutes ago, PS1 said: RemoteQueryEx Yes. This has been added! 1 Quote Link to comment Share on other sites More sharing options...
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.