Hello, we have a grid that is reused across 4 separate screens in an SPA. We are dynamically changing the dataManager, filterSettings, and the query based on the screen when a person clicks on the menu. Everything works perfectly as expected EXCEPT for when you set those 3 items it hits the database each setting. Is there a way to group them so this does not happen? Specifically, the endpoint being called runs 10 queries on the server to return the data and because setting it is hitting it 3 times immediately it runs the same 10 queries 3 times for a total execution of 30 on the server. Its a standard grid that has already been created and loaded and here is our menu code to change parameters dynamically:
var predicate = new ej.data.Predicate('award_status', 'equal', 'Submitted Pending Validation')
.or('award_status', 'equal', 'Validated Pending Approval')
.or('award_status', 'equal', 'Returned for Validation')
.or('award_status', 'equal', 'Validation Denied');
award_approval_grid.filterSettings = {
columns: [{ field: 'award_status', matchCase: false, operator: 'equal', predicate: 'and', value: 'Submitted Pending Validation' },],
};
award_approval_grid.dataSource = award_validate_dataManager;
award_approval_grid.query = new ej.data.Query().where(predicate);
This is what we are trying to get to:
award_approval_grid = {
filterSettings: {
columns: [
{
field: 'award_status',
matchCase: false,
operator: 'equal',
predicate: 'and',
value: 'Submitted Pending Validation'
},
],
},
dataSource: award_validate_dataManager,
query: new ej.data.Query().where(predicate)
};
Any thoughts on how to achieve this?