I have a dashboard type page which contains multiple partial views each of which contain a webgrid.
For example this is web grids is in my _CurrentSubscriptions partial view:
WebGrid grid = new WebGrid(Model.Titles,
rowsPerPage: Model.PageSize,
defaultSort: "Name",
ajaxUpdateContainerId: "UserSubscriptions");
@grid.GetHtml(columns: grid.Columns(grid.Column("Name"), grid.Column("Description"),
grid.Column(format: @<text>@Html.ActionLink("Remove", "RemoveSub")</text>)));
I also have an _addSubscription partial view which contains the following grid to show search results.
WebGrid grid = new WebGrid(Model.Titles,
rowsPerPage: Model.PageSize,
defaultSort: "Name",
ajaxUpdateContainerId: "TitlesFound");
grid.Pager(WebGridPagerModes.All);
@grid.GetHtml(columns: grid.Columns(grid.Column("Name"), grid.Column("Description"),
grid.Column(format: @<text>@Html.ActionLink("Add", "AddSub")</text>)));
Both partial views are called from my Subscriptions/index.cshtml
Is it possible to restrict the paging on each of the grids from reloading the page and just update the selected grid?