We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Method selectValueByKey() issue in ejAutocomplete with web api adaptor and mutiSelectionMode

Thread ID:

Created:

Updated:

Platform:

Replies:

128893 Feb 14,2017 12:15 PM Feb 24,2017 07:08 AM JavaScript 3
loading
Tags: ejAutoCompleteTextBox
Jason Zhu
Asked On February 14, 2017 12:15 PM

Hi,
We use ejAutocomplete with web api adaptor and mutiSelectionMode .  The Web API will fetch data from SQL server database. Basically it works except method selectValueByKey(). For example, we want  ejAutocomplete to display  multiple selections based on several keys (20,21),  we call  $('#' + controlID).ejAutocomplete("selectValueByKey", keys). However, it failed to work, ejTextbox was empty.

Could you please explain how to use method  selectValueByKey() or give example with above scenario?

Thanks,

Jim 

Arun Palaniyandi [Syncfusion]
Replied On February 15, 2017 12:36 PM

Hi Jim , 
Thanks for contacting Syncfusion support. 
We have analyzed the reported query and the selectValueByKey method will not work with Web API adaptor. Because data will be bound to it only on search operation, so key value will not be available to set text. If you need to selectValueByKey using Web API then corresponding filtering must be done in API method. We have also created a simple service and then given a sample for your convenience below. This will bind Web API data to Autocomplete. 
If the provided sample does not meet your requirement, please get back to us with more information that will help us to provide the solution at earliest.  
Regards, 
Arun P. 


Jason Zhu
Replied On February 23, 2017 08:33 AM

Thank you. It helps a lot!

Jim 

Arun Palaniyandi [Syncfusion]
Replied On February 24, 2017 07:08 AM

Hi Jim, 
 
We are glad to hear your issue has resolved and you are most Welcomed. 
 
Please let us know if you have any queries in future. 
 
Regards, 
Arun P. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;