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 bet this is a simple question. I am trying to render a dropdown in a member profile editor. But when I load the page and try to render the control the list of items seems to be empty. So I cannot set the selected value. When the control is done rendering the items are there.
This is the code:
String controlType = Member.GetCurrentMember().getProperty(propertyType).PropertyType.DataTypeDefinition.DataType.DataEditor.Editor.GetType().ToString();
ListItem li = ((dropdown)dataEditorControl).Items.FindByValue(property.Value.ToString());
if (li != null)
int i = ((dropdown)dataEditorControl).Items.IndexOf(li);
((dropdown)dataEditorControl).SelectedIndex = i;
My problem is just that at this point (in Page_Load) the Items collection is empty. I can see that the count property is 0.
Is there some sort of late binding, or can anyone else offer a clue as to what is happening.
I have tried doing this setting the selected value in the DataBound event without any luck.
Any thoughts on this?
It turns out that my problem wasn't in my User Control at all.
I was trying to set the values in the Umbraco Backend Member area, and it didn't save the values. I am using the latest build of Chrome for Windows XP 126.96.36.1996, and it just didn't save the values. I have seen incompatibilities with Chrome and the Umbraco Backend before, so I should have looked at that first...
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted