Note that there are some explanatory texts on larger screens.

plurals
  1. POI can't get my SharePoint ListItem Fields
    primarykey
    data
    text
    <p>I want to show all fields of a certain ListItem. This includes LookUpFields and ChoiceFields. But I only seem to be able to show Textfields, like Title. How can I show all fields of my ListItem? The problem is that I get an error when I try to show other fields of a listitem the way I got 'Title' to show, as if the strings I type in don't exist as fields in that listitem. But they do exist and are populated with values! What is good way to show custom fields of a listitem without getting ObjectReference errors? Also I get this error: The given key was not present in the dictionary.</p> <pre><code> private void foo() { using (ClientContext context = new ClientContext(ApplicationContext.Current.Url)) { _list = context.Web.Lists.GetByTitle("MyList").Title); _items = _list.GetItems(CamlQuery.CreateAllItemsQuery()); context.Load(_items); context.ExecuteQueryAsync( new ClientRequestSucceededEventHandler(OnListItemsRequestSucceeded), new ClientRequestFailedEventHandler(OnListItemsRequestFailed)); } } private void OnListItemsRequestSucceeded(Object sender, ClientRequestSucceededEventArgs args) { // this is not called on the UI thread Dispatcher.BeginInvoke(ShowListItemDetails); } public void ShowListItemDetails() { foreach (ListItem i in _items) { TextBox_Details.Text += i["Title"].ToString() + Environment.NewLine; // Now the rest of the fields of this item. } } </code></pre> <p>Edit: What also is a big problem is I cant get the debugger working. This code is running as a Silverlight webpart on a local Sharepoint site. I attach the debugger to the iexplorer.exe but it won't break. If I could get the debugger to work it would be a great help indeed. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload