question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DevExtreme.AspNet.Data (client): filter specified via loadParams not working

See original GitHub issue

I’d like to predefine filter on a dataSource (e.g. display data of current date). When filter specified via loadParams an error occured because for loadParams JSON.stringify() is not called and even though it will not applied becuse of this line of code: $.extend(result, loadParams);

My code:

dataSource: DevExpress.data.AspNet.createStore({
    loadUrl: "api/Orders",
    loadParams: {
          filter: ["Date", ">=", moment(new Date()).format('YYYY-MM-DD')]
     }
}),

Is it a bug or I’m doing smth wrong?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AlekseyMartynovcommented, Apr 18, 2019

Now it’s not documented and looking like a bug.

Per our docs, loadParams are

additional parameters that should be passed to loadUrl

They are not intended to override the standard load options such as sort or filter. Their serialization is handled by the underlying AJAX implementation (e.g. https://api.jquery.com/jQuery.param).

0reactions
AlekseyMartynovcommented, Apr 19, 2019

The question seems to be resolved. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Omitting Empty query parameters in DataGrid's LoadParams
Now in some situations I do not want to send a "startTime" parameter, since it is an optional filter parameter, but the problem...
Read more >
DataGrid - How to apply the filter paramter to DataSource ...
I have a datagrid with a template tab to sub-dataset. From this sub-grid/template, I want to apply a filter to the lookup column...
Read more >
Cannot get DataLoader Filter 'Contains' to work (with ...
I'm trying to filter using a 'contains' expression but it's not working. Any idea why? Is it possible to get 'contains' working with...
Read more >
DataSource - AspNet.Data - How to refresh Store with an ...
Hello, I can refresh AspNetData Datasource in my MVC projects with using new JS() I am having problem to refresh it in my...
Read more >
DataGrid - Cannot pass a parameter to the LoadParams ...
And i noticed that the Data source attached in lookup working ... You cannot specify load params in this manner using the Razor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found