How to filter combobox when you paste in a value

Right now we have a combobox inside a grid. We cannot load all the data and bind it to the combobox initially because there are hundreds of thousands of records so instead we just limit the number of records returned based on the value in that cell (combo box).
So for example if we have a combo box that has an ID13-28-038-1. I used aCellSelectHandler and called the following down below.

This will essentially get the values of the current line and call a query to pull a limit amount of data. If there is nothing in that line it will just return null. If the user wants to copy and paste a new ID in the combo box, i need an event it will call to make the API call to the database. I tried Filtering event and valuechanged, but unfortunately the filter method will not pick up the value that has been pasted in. Also until i click somewhere off the combo box, only then will valuechanged get called and then you have to click back on the combo box and click the drop down again. Is there a way where, If i click on the combo box and paste in a value, an event can be called and display the data with the combo box expanded to show the list of results. Thanks


List selectedRows = await GridInstance.GetSelectedRecords();

if (selectedRows.First().FSDeliveryLocationId != "")
{
string locationAddress = //API call to get addresses
}
else
locationAddresses = null;

public async Task onFiltering(FilteringEventArgs args)
{
if (comboboxObj.Value != null && comboboxObj.Value !="" && comboboxObj.Value.Length > 10)
{
string locationAddress = //API call to get addresses
await this.comboboxObj.Filter(locationAddresses, query);
comboboxObj.Refresh();
}

1 Reply 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team September 15, 2020 02:14 PM UTC

Hi Chris,  

Greetings from Syncfusion support.  

The reported issue “while copy and paste the value in the Combobox, filtering event is not triggered and value is not filtered” has been working as expected in the version 18.2.57. So we suggest you to upgrade to the latest version 18.2.57 to get rid of the issue.  



Kindly check with the above sample and video. Please get back us if you need further assistance.  

Regards,  
Ponmani M 


Marked as answer
Loader.
Up arrow icon