以编程方式设置 radgrid 页码并向每个页面分配不同大小的数据集
各位下午好。
我正在使用 radgrid,因为它有很多我希望保留的功能(导出、行选择、滚动等),但我遇到了一个请求,我不知道如何处理,因此,我想要一些建议!
我有一个附加到对象数据源的 radgrid,该对象数据源实现了 GetProductList 的 SelectMethod 和 CountProductItems 的 SelectCountMethod。这将返回类似以下内容的内容:
CountProductItems 返回 9。
我需要做的是动态设置 radgrid,以便分页由 guid 定义,即每个 guid 一页 展示。
所以在上面的例子中,我们有 3 个页面。
页面加载时,您将显示第 1 页:
寻呼机项目显示 1、2、3。
单击第 2 页,您会看到:
,然后单击第 3 页:
这有意义吗?是否可能,如果可以,非常感谢任何指点。
Afternoon folks.
I am using a radgrid as this has lots of functionality that I wish to keep (exporting, line selection, scrolling, etc) but I have come across a request I'm not sure how to handle and as such, I'd like some advice!
I have a radgrid attached to an object datasource implementing a SelectMethod of GetProductList and a SelectCountMethod of CountProductItems.This would return something along the lines of:
With CountProductItems returning 9.
What I need to do with this is dynamically set the radgrid so that the paging is defined by the guid i.e. one page for each guid present.
So in the above example, we'd have 3 pages.
On page load you'd be shown Page 1:
With the pager items displaying 1, 2, 3.
Click on page 2 and you'd see:
and clicking on page 3:
Does that makes sense? Is it possible and if so, any pointers greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定这是否可以通过分页实现。不过,我认为很有可能根据它们所在的“页面”来设置一些具有自定义查询的按钮。所以一个“<”和“>”网格下方的按钮。我不久前为一个项目实现了类似的东西,具体取决于他们的成员组,并使用 Linq 进行查询。
I'm not sure if this is possible with paging. However I think it is very possible to set up some buttons with custom queries depending on the "page" they are on. So a "<" and ">" button underneath the grid. I implemented something similar to this a while ago for a project depending on their member groups, and queried using Linq.