开发者

Preserve paging with the DevExpress MVCxGridView control?

I'm working with the 10.2 version of the DevExpress MVC controls. I have a page hosting a MVCxGridView and I need to preserve the current page when navigating away and back to this particular page.

I can see from the old ASPxGridView documentation that there's a PageIndex property, but this seems to only 开发者_如何转开发be accessible from a WebForms/Code Behind/Server Control type context. I'm using MVC and can't figure out how to preserve this page setting.

I've tried the cookie settings with the control but those don't seem to persist for me.

Any pointers would be greatly appreciated.


Currently the MVC grid doesnt support SEOFriendly, or at least I cant find anything on it. You might be able to support it yourself using JQuery and perhaps a paging template which redirects the user to the same page adding a paging parameter like ?paging=2. So basically you check if the url has a paging parameter and if so you can tell the grid to GotoPage(paramValue) telling it in this case to start at page 2.


You could get the gridview's page number in the body unload event and then save that value in a cookie. Next time back at the page, in the gridview's init event read the cookie value and set the grid view's page numbe.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜