SPGridView - 用户选择列

发布于 2024-08-03 17:23:52 字数 80 浏览 6 评论 0原文

有没有办法在 Web 部件中扩展 SPGridView 控件,以便用户可以选择他们想要显示的列?有点像创建/修改列表视图时?

谢谢

Is there a way to extend the SPGridView control in a webpart such that a user can select the columns that they want to display? Kinda like when creating/modifying a view for a list?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暗地喜欢 2024-08-10 17:23:52

SPGridView 未密封< /strong> 所以当然可以用这个功能来扩展它。您需要针对用户选择的内容构建自己的数据存储(SharePoint 列表就足够了),进行 UI 修改等。

在尝试扩展提供的 SharePoint 控件时我发现的一件事是,即使大多数控件都不是“它们不是密封的,通常也不是为了扩展而设计的。在某些情况下,成员也会被混淆,这在某些情况下可能会终止扩展计划。

在投入这项开发之前,请确保您通过一些快速的概念证明尽可能多地研究这一点。您可能会发现有必要从头开始编写自己的控件(或者找到另一个提供此功能的标准 ASP.NET 控件并将其连接到 SharePoint 数据源)。

SPGridView is not sealed so certainly it can be extended with this functionality. You would need to build your own data store of what users have chosen (a SharePoint list should suffice), make the UI modifications, etc.

One thing I've found when trying to extend the provided SharePoint controls is that even though most aren't sealed, often they aren't designed to be extended either. In some cases the members are obfuscated as well which in some cases can put an end to extension plans.

Make sure you research this as much as possible with some quick proof of concepts before devoting to this development. You may find it's necessary to write your own control from scratch (or find another standard ASP.NET control that provides this functionality and hook it up to a SharePoint data source).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文