我正在创建一个具有这样标记的 Sitecore Sheer UI 向导
<WizardFormIndent>
<GridPanel ID="FieldsAction" Columns="2" Width="100%" CellPadding="2">
<Literal Text="Brand:" GridPanel.NoWrap="true" Width="100%" />
<Combobox ID="Brand" GridPanel.Width="100%" Width="100%">
<!-- Leave empty as I want to populate available options in code -->
</Combobox>
<!-- Etc. -->
</WizardFormIndent>
但是我似乎找不到在旁边的代码中向组合框“品牌”添加选项的方法。有谁知道如何完成下面的代码?
[Serializable]
public class MySitecorePage : WizardForm
{
// Filled in by the sheer UI framework
protected ComboBox Brands;
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!Context.ClientPage.IsEvent)
{
IEnumerable<Brand> brandsInSqlDb = GetBrands();
// this.Brands doesn't seem to have any methods
// to add options
}
}
}