Hi Joshua,
Greetings from Syncfusion support.
You can find the response for your queries below,
Query – 1: “Do you have an example of using the "Excel like" filters with a remote OData data source?”
As per your requirement we have prepared a Grid sample with OData adaptor and Excel filtering enabled. You can find it below,
Query – 2: “It seems that whenever a filter is clicked, 1000 records are queried from the database, regardless of the column. Since the data is already loaded into the grid, why is it required to query it again?”
When remote data is bound to the Grid, a request for getting the records to be displayed in the filter dropdown list will be sent each time the filter dialog is opened. This is because when remote adaptor is bound to the Grid, all the data required for processing needs to be returned from the server as this is its use case. The request for 1000 records is the default value set in the source for fetching filter records. However this value can be modified if needed by changing the
filterChoiceCount argument value in the
actionBegin event when the
requestType is
‘filterchoicerequest’ as demonstrated in the below code snippet,
|
// Grid’s actionBegin event function
function onActionBegin(args) {
if (args.requestType === "filterchoicerequest") {‘
// Filter choice count is modified
args.filterChoiceCount = 200;
}
} |
Query – 3: “When I return data from the excel filter query to the dataSource function, if my field is a date, I get an error in the file dateFormatter.js:Uncaught (in promise) TypeError: value.getDate is not a function. What format is expected here?”
For this case, you can return the date values in Date format as displayed in the below image,
This can be checked in the sample shared above.
Let us know if you have any concerns.
Regards,
Sujith R