new to the development world, not to sharepoint.
I'm ultimately trying to populate a listbox with items from a multivalue lookup field. If it's a single lookup, no problem. When I make it a multi it's blank. Hopefully the below is enough to make sense of what the heck I'm doing. An example of what my code should look like would help this novice out tremendously.
public class NLPLibraryColumns
{
public string Title { get; set; }
public string Body { get; set; }
public string DocumentsLink { get; set; }
}
private static ClientContext context = null;
public static ListItemCollection libListItems { get; set; }
ObservableCollection<NLPLibraryColumns> gLibCol = new ObservableCollection<NLPLibraryColumns>();
private void BindData()
{
var list = new List<NLPLibraryColumns>();
foreach (var itm in Global.libListItems)
{
list.Add(new NLPLibraryColumns
{
DocumentsLink = ((FieldLookupValue)itm["DocumentsLink"]).LookupValue,
Body = itm["Body"].ToString(),
Title = itm["Title"].ToString(),
});
}
rGrid1.ItemsSource = list;
}