Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using this in a site but because there's no validation on the keys, I've been getting the dreaded error "An item with the same key has already been added."
Just add this to the KeyValueEditorValueConverter line 42
var uniqueValues = pairs.GroupBy(pair => pair.Key) .Select(group => group.First()) .ToDictionary(pair => pair.Key, pair => pair.Value); foreach (var pair in uniqueValues) { retval.Add(pair.Key, pair.Value); }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Handle duplicate keys
I'm using this in a site but because there's no validation on the keys, I've been getting the dreaded error "An item with the same key has already been added."
Just add this to the KeyValueEditorValueConverter line 42
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.