SPFieldLookupValue
//得到查阅项的值
SPWeb web = site.OpenWeb();
SPList list = web.Lists["DemoList"];
SPListItem item = list.GetItemById(itemId);
SPFieldLookupValue objLookupFieldValue = new SPFieldLookupValue(item["lookup"].ToString());
//可以得到以下属性
objLookupFieldValue.LookupValue //得到查阅项的值
objLookupFieldValue.LookupId //得到或设置查阅项ID
//也可以利用itemID得到查阅项集合
SPFieldLookupValueCollection objLookupFieldValueCol = new SPFieldLookupValueCollection(item["lookup"].ToString());
for (int i = 0; i < objLookupFieldValueCol.Count; i++)
{
SPFieldLookupValue singlevalue = objLookupFieldValueCol[i];
}
SPFieldLookupValue的更多相关文章
- SPFieldLookupValue class
using System; using Microsoft.SharePoint; namespace ConsoleApp { class Program { static void Main(st ...
- 关于在Share point 2010 中保存SPFieldLookupValue类型到一个List中的问题
在share point 中,有时字段的类型是lookup的,那么将会从另外的一个list中进行相应的连接,这是如果保存string等类型,将会报一个错, Invalid data has been ...
- [SharePoint 2010] Copy list item with version history and attachment
private void MoveItem(SPListItem sourceItem, SPListItem destinationItem) { if (sourceItem == null || ...
- SharePoint 2013 列表多表联合查询
在SharePoint的企业应用中,遇到复杂的逻辑的时候,我们会需要多表查询:SharePoint和Sql数据表一样,也支持多表联合查询,但是不像Sql语句那样简单,需要使用SPQuery的Joins ...
- how to get sharepoint lookup value
SPFieldLookup lookUp1 = properties.ListItem.ParentList.Fields.GetField("Leave_x0020_Type") ...
- SharePoint 设置Lookup 字段的值
如何设置Lookup字段的值, 首先我们同样需要了解SPFieldLookupValueCollection和SPFieldLookupValue, 这2个类的原理和之前所讲解到SPFieldUser ...
- SharePoint2010 对象模型 关联列表
有关列表的创建其实网上已经有很多文章了,其中练习 :利用Visual Studio 2010创建列表这篇文章个人感觉还不错,这里我强调的是对象模型来创建.在这之前我插入一点其他的东东,导入电子表格和数 ...
- SharePoint 列表多表联合查询
在SharePoint平台二次开发中,我们有时需要涉及多表关联查询展示多列表中的不同字段信息:SharePoint和Sql数据表一样,也支持多表联合查询,但是不像Sql语句那样简单,有一定的局限性,需 ...
- SharePoint2010QuickFlow安装及使用
一:QuickFlow的安装 1,从http://quickflow.codeplex.com/下载解决方案包以及设计器. 2,将QuickFlow.dll以及QuickFlow.UI.dll添加到程 ...
随机推荐
- springcloud系列五 feign远程调用服务
一:Feign简介 Feign 是一种声明式.模板化的 HTTP 客户端,在 Spring Cloud 中使用 Feign,可以做到使用 HTTP请求远程服务时能与调用本地方法一样的编码体验,开发者完 ...
- 弃用serv-u,改用 Xlight FTP
Serv-u 强大,设置也较麻烦一点,针对serv-u的攻击也很丰富.试用期只有一个月,破解版的用着也不放心 Xlight FTP 设置简单,个人版免费使用,感觉良好!
- Kibana源码启动报错记录--ENOSPC
执行该命令可解决:echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysc ...
- Linq,拉姆达表达式注意!
linq的条件语句尽量不要出现计算的式子,要不然很可能,程序不能正确的将这些复杂的式子编译成表达式!! 例如: dataContext.Assets.Count(s => s.SubCatego ...
- 小乐乐打游戏(BFS+曼哈顿距离)
时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 小乐乐觉得学习太简单了,剩下那么多的时间好无聊 ...
- Educational Codeforces Round 3 A
A. USB Flash Drives time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- 51Nod - 1242 斐波那契(快速幂)
斐波那契数列的定义如下: F(0) = 0 F(1) = 1 F(n) = F(n - 1) + F(n - 2) (n >= 2) (1, 1, 2, 3, 5, 8, 13, 21, ...
- day31 管道 进程池 数据共享
1. 管道(了解) #创建管道的类: Pipe([duplex]):在进程之间创建一条管道,并返回元组(conn1,conn2),其中conn1,conn2表示管道两端的连接对象,强调一点:必须 ...
- Go语言基础之8--面向对象编程1之结构体(struct)
一.结构体详解 1.1 声明和定义 1.Go中面向对象是通过struct来实现的, struct是用户自定义的类型 2.Go 语言中数组可以存储同一类型的数据,但在结构体中我们可以为不同项定义不同的数 ...
- python3 reversed() 函数笔记
需要逆向循环序列的话,先正向定位序列,然后调用 reversed() 函数. for i in reversed(range(1, 10, 2)): print(i) 97531