Adds default value support to ListBox and ListBoxMultiple data editor setting types

This commit is contained in:
starfighter83
2011-07-26 08:15:28 -02:00
parent ff02f5a336
commit 0f84165b2b
2 changed files with 7 additions and 5 deletions

View File

@@ -37,7 +37,10 @@ namespace umbraco.editorControls.SettingControls
lb.Items.Add(s);
}
lb.SelectedValue = _val;
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
lb.SelectedValue = DefaultValue;
else
lb.SelectedValue = _val;
return lb;
}