This is a migrated thread and some comments may be shown as answers.

[Solved] Restoring Grid State

0 Answers 9 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Roman
Top achievements
Rank 1
Roman asked on 20 Nov 2012, 10:20 PM
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
Tags
Grid
Asked by
Roman
Top achievements
Rank 1
Share this question
or