retrieve sharepoint list items that also include lookup columns

  • Thread starter Thread starter msdnpublic1234
  • Start date Start date
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.

1372310.png

Continue reading...
 

Similar threads

M
Replies
0
Views
224
msdnpublic1234
M
I
Replies
0
Views
83
IndigoMontoya
I
Back
Top