开发者

Multiple MVCContrib Grid on 1 page

I have multiple mvccontrib grids on 1 view page each w/ its own pagination. My problem is when I page 1 grid it pages the other 2 as well. Is there I can differentiate what grid is being ca开发者_高级运维lled so only the 1 gets paged or are there any other work around for this


You could set the page query string parameter to different values on both grids:

@Html.Pager(Model.Collection1).QueryParam("page1")
@Html.Pager(Model.Collection2).QueryParam("page2")

or build the query string yourself:

@Html.Pager(Model.Collection1).Link(page => Html.ActionLink(page, "SomeAction", new { page1 = page, page2 = Request["page2"] }))
@Html.Pager(Model.Collection2).Link(page => Html.ActionLink(page, "SomeAction", new { page1 = Request["page1"], page2 = page }))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜