为列表定义中的视图启用内联编辑
我当前正在创建一些列表定义以在 SharePoint 2010 环境中使用。在这些定义中,我需要定义一个支持内联编辑的视图。通过将 SPView 对象的 InLine 属性设置为“TRUE”,可以在 UI 和代码中轻松完成此操作,但是我找不到视图的 CAML 定义的任何属性来设置该属性。
我查看了 Visual Studio 在自动完成功能中为元素和同一元素的直接子元素提供的内容,但似乎没有什么相关的。
有人知道我是否在完全错误的地方查找,或者知道在列表定义的 schema.xml 中的何处设置它?
I'm currently creating some list definition for use in a SharePoint 2010 environment. In these definitions I need to to define a view which enables in-line editing. This is easily accomplished in the UI as well as from code by setting the InLine property of the SPView object to "TRUE", however I can't find any property of the CAML definition of the view to set the property.
I've looked at what Visual Studio supplies in the auto-complete for both attributes of the element and immediate children of the same element and nothing seems to be relevant.
Anyone know if I'm looking in the entirely wrong place, or have any idea where to set this in the schema.xml of the list definition?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过定义 InlineEdit 元素并为其指定 TRUE 值,在列表定义 (Schema.xml) 的 View 元素中启用内联编辑,如下所示:
You can enable Inline Editing in the View element of the List definition (Schema.xml) by defining the InlineEdit element and giving it a value of TRUE, like so:
快速说明一下,在 SharePoint 2010 中,基于 CAML 的视图已过时。尽管基于 CAML 的视图将在 2010 年运行,但下一版本的 SharePoint 将不再支持。考虑到您正在开发新的列表定义,恕我直言,我建议您查看基于 XSLT 的视图,看看是否可以在 XSLT 中满足您的需求。
On a Quick Note,In SharePoint 2010 CAML Based view is obsolete. Though CAML based view will work in 2010 it will not be support for the next version of SharePoint. Considering that you are developing new List Definition IMHO I recommand to look in to the XSLT based views and see if you could get your requirement work in the XSLT.