Page 1 of 2

Multiple AutoComplete

PostPosted: 02 Dec 2013 00:36
by zsleo
I have a dialog with 3 auto-complete components that operate on the same dataset.

Each auto-complete has it's own GetAutoCompleteData that looks like this:

Code: Select all
procedure TiwfrmMain.iwcgjqtcmpltURNGetAutoCompleteData(Sender: TObject; const ATerm: string; var AJSon: ISuperObject);
begin
  gv_URN := ATerm;
.
.
  DoSearch;
end;

The last action of the DoSearch procedure is a [grid].JQGridOptions.ReloadGrid;

The dataset does have records but I cannot get it to refresh the grid.

Works perfectly with only one AutoComplete.

What am I doing wrong...

Regards

Zane

Re: Multiple AutoComplete

PostPosted: 02 Dec 2013 10:58
by Jorge Sousa
Hi zsleo

the OnGetAutoCompleteData, is a special event just for ajax data loading, whatever Intraweb code you call there, it won't be executed in the browser.

To execute [grid].JQGridOptions.ReloadGrid, you have to use AutoComplete normal events, like AutoCompleteOptions.OnChange

Re: Multiple AutoComplete

PostPosted: 03 Dec 2013 08:16
by zsleo
Thanks,

I implemented your suggestion.

At design time: When the auto complete is triggered I am getting a "Unitialized Reply" error; I click OK and the correct list is presented.

At resign time: When the auto complete is triggered there is no error but the selected list is not presented.

I have tried with both "...JQEventsChange" and "...JQAutoCompleteOptionsChange"

Help please...

Regards

Zane

Re: Multiple AutoComplete

PostPosted: 03 Dec 2013 09:40
by zsleo
UPDATE: Designtime and run time

If i press tab key before the event is triggered then it works without error

Re: Multiple AutoComplete

PostPosted: 03 Dec 2013 16:16
by Jorge Sousa
Hi Leo

What you mean by

At design time: When the auto complete is triggered I am getting a "Unitialized Reply" error; I click OK and the correct list is presented.


At design-time nothing happens, only what you see in the IDE.

Re: Multiple AutoComplete

PostPosted: 03 Dec 2013 23:11
by zsleo
... running the app in the debugger (F9)

Re: Multiple AutoComplete

PostPosted: 04 Dec 2013 22:46
by zsleo
any update?

Re: Multiple AutoComplete

PostPosted: 04 Dec 2013 23:11
by Jorge Sousa
Hi

We need more details,

"Unitialized Reply" is an Intraweb message, means that no data has been added to response / reply.

Re: Multiple AutoComplete

PostPosted: 05 Dec 2013 06:05
by zsleo
do you want to connect to my computer? Skype/TeamViewer

Re: Multiple AutoComplete

PostPosted: 05 Dec 2013 10:32
by Jorge Sousa
Hi

Yes please connect to skype, id: cgdevtools.