This question is locked. New answers and comments are not allowed.
I am using the grid state preserve/restore functionality that was already outlined in these forums - which works most of the time. I am running into an issue where grid state is not restored when the grid is using AJAX binding to an action with a parameter, for example:
public ActionResult GetDataAjax(string id)
{
// do something
return View(new GridModel<SomeModel>(query));
}
And the grid has the following binding:
.DataBinding(binding => binding.Ajax().Select("GetDataAjax", "MyController", new { @area = "MyArea", @id = SomeValue }))
If the @id parameter is not there, everything works, but as soon as there one or more parameters, the state restore functionality breaks.
Please help!
Thanks,
Roman
public ActionResult GetDataAjax(string id)
{
// do something
return View(new GridModel<SomeModel>(query));
}
And the grid has the following binding:
.DataBinding(binding => binding.Ajax().Select("GetDataAjax", "MyController", new { @area = "MyArea", @id = SomeValue }))
If the @id parameter is not there, everything works, but as soon as there one or more parameters, the state restore functionality breaks.
Please help!
Thanks,
Roman