Excel Filter text input autocomplete

Hi, the excel filter for the grid check boxes populate with data correctly, but the text box search inside the excel filter gets no results back as I enter text in it. I know it uses the grids data manager, but what data is it expecting to get back as a response? And how do I set it? What format should it be in? Currently my api only returns the Grid data {items, count}, these don't seem to be what is required for the text search box in the excel filter. Does it need its own data manager?


I am using Django in this case, so mainly python and javascript. Thanks!


Also when trying the Menu filter I get

Image_3956_1698872973812

I suspect its likely for the same reason. 

This is with a WebApiAdaptor as the data source for the grid.

I do not see a request type other than 'filterbeforeopen' to try and handle what's going on here. 


1 Reply

VS Vikram Sundararajan Syncfusion Team November 8, 2023 12:18 PM UTC

Hi Mark,


Greetings from Syncfusion support,


Thanks for sharing the details. The Grid component requires object formatted as "result" and "count" to display the records properly. This situation is handled in the UrlAdaptor using the "RequiresCounts" query parameter. When performing actions in the Grid component, the "RequiresCounts" parameter will be true, and you need to return the response as a "result" and "count" formatted object from the server.


The Filter Menu uses the AutoComplete component to display suggestions when typing in the string-type filters. The AutoComplete component expects the dataSource as an array of objects to show the suggestions.


When typing in the Filter Menu Input box (AutoComplete component) / typing the Excel filter, the "RequiresCounts" parameter will be undefined. In this case, you need to return the result as an array of objects from the server. This ensures that the suggestions are displayed correctly in the Filter Menu Input box (AutoComplete component). Please refer to the code snippet below for reference:


 

public ActionResult UrlDatasource(DataManagerRequest dm)

{

   IEnumerable DataSource = BigData.GetAllRecords().ToList();

    // perform the actions here

   ----  

   // return the data based on RequiresCount

   return dm.RequiresCounts ? Json(new { result = DataSource, count = count }) : Json(DataSource);

}

 


Please let us know if you need any further assistance.


Regards,

Vikram S



Loader.
Up arrow icon