Dropdown capture filter event

I want to capture the filter event when user enters any search data.
When dropdown is initialized i am setting a dataSource with some data.
When the user filters for specific data, it will use the dataSource data to filter on client side.
If i dont find the filter data i want on client side then i want make a call to server side API and get more data from different source and bind it to same dropdown 

is there a Event to know when we get No Records Found



3 Replies 1 reply marked as answer

JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team August 3, 2020 12:52 PM UTC

Hi Vin,

Greetings from Syncfusion support.

We would like to know you that  if you set alowFiltering to true you can capture the filtered text using Filtering event which triggers on every input provided in the filter bar.


 
public onFiltering: EmitType<FilteringEventArgs> = (eFilteringEventArgs) => { 
    let queryQuery = new Query(); 
    //frame the query based on search string with filter type. 
    query = (e.text !== '') ? query.where('Name', 'startswith', e.text, true) : query; 
    //pass the filter data source, filter query to updateData method. 
    e.updateData(this.data, query); 
} 



 Please find the API and sample links below.

API Link : https://ej2.syncfusion.com/angular/documentation/api/drop-down-list#filtering 
Jeyanth.



Marked as answer

VI vin August 4, 2020 02:48 AM UTC

Thanks


JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team August 4, 2020 10:36 AM UTC

Hi Vin,

Thanks for your update.

Please let us know if you need any further assistance.

Regards,
Jeyanth.


Loader.
Up arrow icon