Sharepoint 中自定义列类型中的只读属性

发布于 2024-07-12 04:34:45 字数 459 浏览 5 评论 0原文

我正在为 Sharepoint 的功能创建自定义列。 本质上是这样的:

<Field 
  Type="Integer" 
  ID="<insert guid here>" 
  ReadOnly="true"
  Name="xxx"
  DisplayName="XXX"
  Group="YYY" />

当字段被部署并附加到内容类型时,内容类型不会显示附加的该字段的实例。 关于 ReadOnly 的文档有点模糊,但明确指出该列将可在视图中查看。 但是,当我创建视图时,它不可用。

当我从字段中删除 ReadOnly 时,它就可以在内容类型上使用,没有任何问题。 有任何想法吗?

I'm creating a custom column in a feature for Sharepoint. It is essentially this:

<Field 
  Type="Integer" 
  ID="<insert guid here>" 
  ReadOnly="true"
  Name="xxx"
  DisplayName="XXX"
  Group="YYY" />

When the field is deployed and attached to a content type, the content type shows no instance of this field being attached. The documentation about ReadOnly is a bit vague but definitely states that the column will be available for viewing in a View. However, when I create a view it is not available.

The moment I remove ReadOnly from the field, it is available on the content type without any problems. Any ideas?

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

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

发布评论

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

评论(2

笨笨の傻瓜 2024-07-19 04:34:45

我已经在开发框中使用 SharePoint 设计器尝试了相同的架构来创建它。 在将类型从“整数”更改为“数字”之前,我无法查看该列,

不确定是否支持“整数”。

I have tried out the same schema in a dev box using SharePoint designer to create it. I have issues seeing the column until I change the type from "Integer" to "Number"

Not sure "Integer" is supported.

寄居人 2024-07-19 04:34:45

您是否尝试过将 ReadOnly 放在内容类型的 FieldRef 而不是 Field 元素上?

Have you tried putting ReadOnly on the content type's FieldRef instead of the Field element?

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