Sharepoint - 更改列表中字段的显示方式
我有一个包含多个查找字段的共享点列表。我想更改其值的显示方式(通常您会获得指向所选项目的链接,例如 item1;item2;item3),以便我可以构建自己的链接以将我重定向到按在此选择的项目过滤的源列表抬头。
我尝试通过继承 SPFieldLookup 创建自定义字段来做到这一点,但我有点卡住了,因为我不知道要重写哪个方法/属性来更改正在显示的内容(如果这可以在全部)。任何帮助将不胜感激
I have a sharepoint list that contains a multiple lookup field. I would like to change the way its values are displayed (normaly you get links to chosen items like item1;item2;item3), so that I could for instance construct my own link to redirect me to the source list filtered by items chosen on this lookup.
I try to do that by creating a custom field by that is inheriting SPFieldLookup, but i'm a bit stuck since I can't don't know which method/property to override to change what is being displayed (if this is possible at all). Any help would be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将创建一个继承自
SPFieldLookup
的自定义字段类型。但我不使用渲染服务器端,而是使用 XSTL 来渲染该字段:如何:自定义列表视图上字段的呈现
这样您就根本不必实现自定义
SPField
类。您只需创建一个指向 OOTBSPLookupField
的自定义字段类型定义。I'd create a custom field type that inherits from
SPFieldLookup
. But instead of do the rendering server side I'd use a XSTL to render the field:How to: Customize the Rendering of a Field on a List View
This way you do not have to implement a custom
SPField
class at all. You just have to create a custom field type definition that points to the OOTBSPLookupField
.