This question is locked. New answers and comments are not allowed.
Hi Team!
I have a grid which uses server binding to initially populate. Once populated the user can click a link which calls a grid.rebind using javascript:
The javascript results in the Ajax Binding method being called on the controller which queries the database passing the query parameter and returns a GridModel object via:
Due to the change noted here, any subsequent paging results in the query parameter originally passed being lost...
So I believe I need to pass the queryType string BACK to the view and then use javascript to keep the query parameter persisted...
Thanks!
I have a grid which uses server binding to initially populate. Once populated the user can click a link which calls a grid.rebind using javascript:
function showFilterRebind(qType) {var activityGrid = $('#reportGrid').data('tGrid');activityGrid.rebind({ queryType: qType}); }The javascript results in the Ajax Binding method being called on the controller which queries the database passing the query parameter and returns a GridModel object via:
[GridAction]
public ActionResult _AjaxBindingActivityReport(string queryType)
{
return View(new GridModel<ReportViewModel>{ Data = _service.getAllActivitiesReport(queryType) });
} Due to the change noted here, any subsequent paging results in the query parameter originally passed being lost...
So I believe I need to pass the queryType string BACK to the view and then use javascript to keep the query parameter persisted...
function dataBinding(args) {
args.data = $.extend(args.data, { queryType: qType });
}
QUESTION IS: How do I pass the queryType value back as the only object being passed back from the Ajax Binding method is
a GridModel??
Thanks!