This example illustrates how to bind the dxLookup to a WebService using the DataSource object. Note that when you are using the DataSource with the dxLookup widget, it is also necessary to implement the byKey(keyValue) method.
Note: The current example does not implement the search mechanism. When using a web service, it is necessary to define the data searchString pattern to filter data at the web service level. For example:
[JScript]if(loadOptions.refresh){return $.get('http://sampleservices.devexpress.com/api/Products', {... searchString: loadOptions.searchString || ''});}<bold>
See also:</bold>
dxLookup - Why the "Lookup callback was not defined" error is thrown when clicking an item if data is loaded from a web service
Example Comments
Added By: Domenik at: 7/26/2013 6:30:01 AM
I used this way with some json data and it works as expected and the data gets listed BUT searching does not work... If i enter so letters nothing happens....
Added By: Marion (DevExpress Support) at: 7/26/2013 6:48:13 AMThe current example does not implement the search mechanism. When using a web service, it is necessary to define the data searchString pattern to filter data at the web service level. For example:
if (loadOptions.refresh) {
return $.get('http://sampleservices.devexpress.com/api/Products', {
...
searchString: loadOptions.searchString || ''
});
}