We have a solution where the user would like to save each grid filter and sort and reuse the saved settings when they reload the page, or visit from a different computer (which rules out enablePersistance)
Currently, I am serialising the query and saving it via a web service call. This is working correctly. However when I attempt re bind the retrieved query to the grid model using the following code an error is thrown:
actionBegin: function (args) {
args.model.query = getGridQuery(args.model.query); // the original query object is passed in to be saved and returned on error
}
Error: DataManager - executeQuery() : A query is required to execute
at u (http://localhost:51142/Scripts/ej/13.3.0.7/ej.web.all.min.js:10:81803)
at Object.t.DataManager.executeQuery (http://localhost:51142/Scripts/ej/13.3.0.7/ej.web.all.min.js:10:26102)
at Object.t.widget._initDataSource (http://localhost:51142/Scripts/ej/13.3.0.7/ej.web.all.min.js:10:1997222)
at Object.t.widget._checkDataBinding (http://localhost:51142/Scripts/ej/13.3.0.7/ej.web.all.min.js:10:1987116)
at Object.t.widget._init (http://localhost:51142/Scripts/ej/13.3.0.7/ej.web.all.min.js:10:1983485)
at Object.<anonymous> (http://localhost:51142/Scripts/ej/13.3.0.7/ej.web.all.min.js:10:16506)
at n.fn.(anonymous function) [as ejGrid] (http://localhost:51142/Scripts/ej/13.3.0.7/ej.web.all.min.js:10:17592)
at Object.createDetailView (http://localhost:51142/Scripts/prototypes/enquiry.routing.js:267:17)
at Object.t.widgetBase._trigger (http://localhost:51142/Scripts/ej/13.3.0.7/ej.web.all.min.js:10:10945)
at Object.t.gridFeatures.common.expandCollapse (http://localhost:51142/Scripts/ej/13.3.0.7/ej.web.all.min.js:10:1712386)
When inspecting the query object in debug mode it looks correct and is set correctly, but the grid always throws the error.
Does anyone have an example which shows the best way to save and reuse a query?
Thanks in advance.