CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Multiple AutoComplete

by zsleo » 02 Dec 2013 00:36

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
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 02 Dec 2013 10:58

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
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by zsleo » 03 Dec 2013 08:16

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
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by zsleo » 03 Dec 2013 09:40

UPDATE: Designtime and run time

If i press tab key before the event is triggered then it works without error
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 03 Dec 2013 16:16

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.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by zsleo » 03 Dec 2013 23:11

... running the app in the debugger (F9)
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by zsleo » 04 Dec 2013 22:46

any update?
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 04 Dec 2013 23:11

Hi

We need more details,

"Unitialized Reply" is an Intraweb message, means that no data has been added to response / reply.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by zsleo » 05 Dec 2013 06:05

do you want to connect to my computer? Skype/TeamViewer
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 05 Dec 2013 10:32

Hi

Yes please connect to skype, id: cgdevtools.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

Next

Return to JQAutoComplete

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.