Datagrid and QueryBuilder Integration

Hi,

When using the datagrid and querybuilder, I have an external button that takes the predicate from the querybuilder and assigns it to the grid.query property. This causes a grid refresh or the datamanger to call the api url. 

When clicking this button, i want to reset the data back to page 1 as its considered a new search. So I call grid.goToPage(1) and then assign the grid.query. The problem is, it makes 2 api calls in a row. Is there a way to pause or suspend the datamanger from requesting data from the api, until all settings (current page, sorting etc) are set, then call grid.refresh or something to have it request the api data?




1 Reply

SR Sivaranjani Rajasekaran Syncfusion Team February 25, 2025 09:58 AM UTC

Hi IceCactus,

 

Greetings from Syncfusion support!


Currently, the EJ2 DataManager automatically triggers a request whenever properties such as query, page, or sorting are updated. This is expected behavior, as DataManager is designed to react to changes immediately and fetch updated data from the API.

At present, there is no built-in support to pause or suspend DataManager requests while applying multiple settings simultaneously. Since each change (like setting the page or updating the query) triggers a request separately, calling grid.goToPage(1) followed by setting grid.query results in two API calls.

We understand the need for better control over request handling, and we have logged a feature request titled "Support for preventing DataManager request." Our team evaluates feature requests during each release cycle based on factors like product vision, feasibility, and customer interest. While we do not have an immediate plan to implement this feature, it will be included in one of our future releases.

You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.

 

Feedback: https://www.syncfusion.com/feedback/56740/support-for-preventing-datamanager-request

 

Please get back to us if you need further assistance.

 

Regards

Sivaranjani R


Loader.
Up arrow icon