Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to bind dxLookup to WebService

$
0
0

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 lookup(lookupOptions) 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 || ''});}

See also:
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 Niemietz at: 7/26/2013 9: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 9:48:13 AM    

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:

if (loadOptions.refresh) {
       return $.get('http://sampleservices.devexpress.com/api/Products', {
            ...
            searchString: loadOptions.searchString || ''
        });
}


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>