使用多个 SPGridView 进行问题排序
我正在使用带有 ObjectDataSource 的 SPGridView 控件SharePoint 2010 解决方案中的控件。 SPGridview 允许我对列表项进行排序和分页,但我注意到当两个 SPGridView 控件放置在同一页面上时出现问题。当我通过单击列的标题链接对下部 SPGridView 控件进行排序时,排序操作成功。但是,当我单击下部 SPGridView 列标题上的 ECB 菜单提供的排序选项时,排序将应用于上部 SPGridView 控件。
任何人都可以提供有关如何解决此问题的修复或指导吗?
谢谢,魔术安迪。
I am using an SPGridView control with an ObjectDataSource control in a SharePoint 2010 solution. The SPGridview allows me to sort and page through a list items OK, but I have noticed a problem when two SPGridView controls are placed on the same page. When I sort the lower SPGridView control by clicking on a column's header link, the sort operation is successful. However when I click on the sort options available through the ECB menu on the lower SPGridView's column header, the sort is applied to the upper SPGridView control instead.
Can anyone offer a fix or guidance on how to resolve this?
Thanks, MagicAndi.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 MSDN 上的一个线程,解释了该错误和解决方案。
http://social.msdn .microsoft.com/Forums/en-US/sharepointdevelopment/thread/af6167a3-21f2-4bb2-94a9-5c22e1aad34d
这是另一篇描述它的博客文章 - http://sharethefrustration.blogspot.com/2010/02/spgridview-webpart-with-multiple-filter.html
Here is a thread on MSDN explaining the bug and a resolution.
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/af6167a3-21f2-4bb2-94a9-5c22e1aad34d
Here is another blog post describing it as well - http://sharethefrustration.blogspot.com/2010/02/spgridview-webpart-with-multiple-filter.html
根据 brian brinley 提供的链接,我想出了这个稍微更通用的解决方案:
Based on the links provided by brian brinley, I came up with this slightly more generic solution: