使用SharePoint 2010客户端对象模型获取选项字段的值

一个API,介绍如何通过客户端对象模型从一个SharePoint 2010列表中获取选项字段的值。

下面就是具体实现方式-

FieldChoice myChoicesfield = clientContext.CastTo<FieldChoice> list.Fields[ "mychoicefiled"];

myChoicesfield.Choices  – >将返回所有的可选项

myChoicesfield.DefaultValue  -> 将得到默认选项的值

参考资料

Get choice field values using client object model sharepoint 2010

posted @ 2010-11-22 10:27  Sunmoonfire  阅读(582)  评论(0编辑  收藏  举报