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 running Umbraco 7.15.3 together with NuPicker 1.7. where I have DotNet Dropdown looking like this:
public class LanguagesDotNetDataSource : IDotNetDataSource
IEnumerable<KeyValuePair<string, string>> IDotNetDataSource.GetEditorDataItems(int contextId)
var languages = ["sv-se", "en-gb"];
var list = new List<KeyValuePair<string, string>>();
for (int i = 0; i < languages.Length; i++)
list.Add(new KeyValuePair<string, string>(i.ToString(), languages[i]));
if (list.Count < 1)
list.Add(new KeyValuePair<string, string>("1", "en-gb"));
Everything works fine in Umbraco backoffice showing a dropdown with "sv-se", "en-gb" and so on but when I´m trying to get the actual value in a view I just get the keys.
var picker = fileNode.GetPropertyValue<Picker>("nuPickerPropertyName");
this returns a picker with both the picked keys and the saved value showing 0 for the first item in the dropdown, 1 for the second and so on.
If i try to get the values using :
the result is null.
Hi Oliver, my guess would be that because it's using a DotNetDataSource, it doesn't know that it's picking Umbraco items, so that method returns null ? If you have the Ids, you could get the PublishedContent from those Ids ?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted