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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:





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

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?



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

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.  
Arun P. 

Jason Zhu
Replied On February 23, 2017 01:33 PM UTC

Thank you. It helps a lot!


Arun Palaniyandi [Syncfusion]
Replied On February 24, 2017 12:08 PM UTC

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. 
Arun P. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon