M
msdnpublic1234
Guest
Hi,
I have a list similar to the one shown below. I am trying to retrieve the list items ,but the lookup columns are not getting retrieved. Pls guide me through the code.I just tried the below ,but no luck.
string siteUrl = "https://abc.sharepoint.com/sales/main";
ClientContext clientContext = new ClientContext(siteUrl);
var securePassword = new SecureString();
var password = "jhnbkjnkjnj";
foreach (char c in password.ToCharArray()) securePassword.AppendChar(c);
clientContext.Credentials = new SharePointOnlineCredentials(@"jknkjnkjjk", securePassword);
List oList = clientContext.Web.Lists.GetByTitle("DataPermissionList");
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "< View >< RowLimit > 100 </ RowLimit ></ View > ";
ListItemCollection collListItem = oList.GetItems(camlQuery);
clientContext.Load(collListItem);
clientContext.ExecuteQuery();
foreach (ListItem oListItem in collListItem)
{
}
I want to fetch the list items and store them in datatable.
Continue reading...
I have a list similar to the one shown below. I am trying to retrieve the list items ,but the lookup columns are not getting retrieved. Pls guide me through the code.I just tried the below ,but no luck.
string siteUrl = "https://abc.sharepoint.com/sales/main";
ClientContext clientContext = new ClientContext(siteUrl);
var securePassword = new SecureString();
var password = "jhnbkjnkjnj";
foreach (char c in password.ToCharArray()) securePassword.AppendChar(c);
clientContext.Credentials = new SharePointOnlineCredentials(@"jknkjnkjjk", securePassword);
List oList = clientContext.Web.Lists.GetByTitle("DataPermissionList");
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "< View >< RowLimit > 100 </ RowLimit ></ View > ";
ListItemCollection collListItem = oList.GetItems(camlQuery);
clientContext.Load(collListItem);
clientContext.ExecuteQuery();
foreach (ListItem oListItem in collListItem)
{
}
I want to fetch the list items and store them in datatable.
Continue reading...