CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Not seeing selected value right away

by sbsllc » 22 Feb 2017 00:09

I am seeing an issue where if I have a jqautocomplete with autofocus = true and the select value is not seen right away if I try to get the value from the underlying dataset or the .text property.

In my case I have two jqautocomplete field side by side and in both I use the ongetautocompletedata to fetch data to display. I have the autofocus = true so the users can tab from that field and have the first choice selected. Everything looks good when they tab to the second field but in that ongetautocomplete field I use the value from the first field to help filter the data returned. With the first character I type the dataset value for that first field is null and the .text property is empty even though a value was selected and is visible but any character typed after the first sees the value in the dataset and the .text property.
sbsllc
 
Posts: 101
Joined: 01 Jul 2014 01:37

by Alexander Bulei » 23 Feb 2017 18:21

Hi sbsllc,

Can you create the simple testcase please? TIA

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by sbsllc » 01 Mar 2017 23:16

Finally got a test case created. Sorry for the delay.

To see the problem I am having you need to add a break point to the IWCGJQAutoComplete2GetAutoCompleteData event to watch the variable SelectedVal.

Run the test case and type something in the first autocomplete field and tab off so it auto selects. Then start to type something in the second autocomplete field and when the IWCGJQAutoComplete2GetAutoCompleteData event fires you will see that the variable SelectedVal is empty.

This is close to what my project is doing without all the DB stuff where I use the value in SelectedVal to filter my data. Also in my case if I leave that field and go back and start typing again seems to pickup the value.
You do not have the required permissions to view the files attached to this post.
sbsllc
 
Posts: 101
Joined: 01 Jul 2014 01:37

by Alexander Bulei » 07 Mar 2017 12:16

Hi sbsllc,

Fixed for next beta build.
Thank you.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by sbsllc » 24 Mar 2017 18:50

I installed 3.0.0.183 and this still does not seem to be working for me. I also checked the changelog file and I do not see this issue listed there.
sbsllc
 
Posts: 101
Joined: 01 Jul 2014 01:37

by Alexander Bulei » 27 Mar 2017 14:39

Hello,

I have fixed the issue with updating of value on auto-select.

But, in your case, you can't use

IWCGJQAutoComplete1.Text


In GetAutoCompleteData event, because this event have another type of request, and doesn't update the vars/props in server...

Please check the attached project, how to resolve your problem.

Best Regards.
You do not have the required permissions to view the files attached to this post.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by assapan » 28 Mar 2017 12:39

Hi,
Is there any special reason why you are populating the json in a "with" section ? :?


with TIWUserSession(WebApplication.Data) do
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by sbsllc » 28 Mar 2017 13:36

No, no reason. I had started the sample project by copying code from my live project which pulls data from a dataset in the user sesssion and I just did not clean that up when I was changing things.
sbsllc
 
Posts: 101
Joined: 01 Jul 2014 01:37


Return to JQAutoComplete

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.