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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ListBox filter

Thread ID:

Created:

Updated:

Platform:

Replies:

149112 Nov 14,2019 07:45 PM UTC Nov 17,2019 06:10 AM UTC JavaScript - EJ 2 1
loading
Tags: ListBox
roberto
Asked On November 14, 2019 07:45 PM UTC

Please give me an example using listbox filter with remote data

Arunkumar Devendiran [Syncfusion]
Replied On November 17, 2019 06:10 AM UTC

Hi Roberto, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your reported query and We have create the sample for your scenario, in that we have using Datamanager for filter the required data in the remote URL.  
 
Please refer the below code snippet and sample link, 
 
Html 
 
<body> 
   <input id='listbox' /> 
</body> 
 
 
 
app.ts 
import { ListBox } from '@syncfusion/ej2-dropdowns'; 
import { Query, DataManager, ODataV4Adaptor } from '@syncfusion/ej2-data'; 
let listObj: ListBox = new ListBox({ 
 
    dataSource: new DataManager({ 
        url: 'https://services.odata.org/V4/Northwind/Northwind.svc/', 
        adaptor: new ODataV4Adaptor 
    }), 
    query: new Query().from('Products').select('ProductName').where('ProductID', 'greaterthan', 2).take(4), 
    fields: { text: 'ProductName' } 
}); 
listObj.appendTo('#listbox'); 
 
 
Sample Link: 
 
Regards, 
Arunkumar D 


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.

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

Live Chat Icon For mobile
Live Chat Icon