Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

I get a KeyNotFoundException and don't know how to debug

$
0
0

Hi,
in my previous question a workaround for my problem is to have a grouped ListView.
So I changed my app's code from nested to grouped ListViews.

Now I get the following KeyNotFoundException:

System.Collections.Generic.KeyNotFoundException: The given key 'Diagnosekreis 1' was not present in the dictionary.


  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <3a61d48d66dd458fa0b64990b6c8f8cc>:0 
  at Cadenza.Collections.OrderedDictionary`2[TKey,TValue].get_Item (System.Int32 index) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\OrderedDictionary.cs:100 
  at Xamarin.Forms.Internals.TemplatedItemsList`2[TView,TItem].GetGroupIndexFromGlobal (System.Int32 globalIndex, System.Int32& leftOver) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\TemplatedItemsList.cs:495 
  at Xamarin.Forms.Platform.Android.ListViewAdapter.GetItemViewType (System.Int32 position) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\ListViewAdapter.cs:147 
  at Android.Widget.BaseAdapter.n_GetItemViewType_I (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 position) [0x00009] in <ff9f3f3d4e134974a889db1b532c9b6e>:0 
  at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.74(intptr,intptr,int)

Diagnosekreis 1 is the ToString()'s output of the first (and only) element of the ListView's ItemsSource.

I have no idea how to debug that error.
What can I do?


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>