// 
// Returns the value of a Lookup-Field with multiple values.
// 
public static IEnumerable
{
List
if (item != null)
{
SPFieldLookupValueCollection values = item[fieldName] as SPFieldLookupValueCollection;
foreach (SPFieldLookupValue value in values)
{
result.Add(value.LookupValue);
}
}
return result;
}
Example:
// Read lookup values of a SPFieldLookup field with multiple values allowed
IEnumerable
About Me
Labels
- General (1)
 - SharePoint 2007 (10)
 - SharePoint 2010 (3)
 
Buddies Blogs
Blog Archive
- 
▼ 
2010
                                (9)
                              
- 
▼ 
February
                                (9)
                              
- Opening PDF in separate window of Web Application...
 - SharePoint Groups vs. Active Directory Groups
 - If Current Navigation is not same as Parent Site N...
 - How to Retrieve Text from Enhanced Rich Text Colum...
 - Reading & Writing SPFieldUrl field values Programm...
 - Setting Multiple Values of SPFieldLookup Column Pr...
 - Setting Single Value of SPFieldLookup Column Progr...
 - Reading Multiple Values of SPFieldLookup Column Pr...
 - Reading Single Value of SPFieldLookup Column Progr...
 
 
 - 
▼ 
February
                                (9)
                              
 
Posted by
Sreedhar Chavali
Wednesday, 17 February 2010
Labels:
SharePoint 2007
Subscribe to:
Post Comments (Atom)