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?
APArun Palaniyandi Syncfusion Team 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.