Aug 18, 2011, 12:44 PM
ComboBox data binding
protected void Page_Init(object sender, EventArgs e)
{
taxingTypeStore.DataSource = GetTaxingTypes(); //returns Dictionary<int, string> which has values
this.taxingTypeStore.DataBind();
}
<div>
<b>Taxing Type</b>
<ext:ComboBox ID="ddlTaxingType" runat="server" StoreID="taxingTypeStore" ValueField="Key" DisplayField="Value" />
<ext:Store ID="taxingTypeStore" runat="server">
<Reader>
<ext:JsonReader IDProperty="Key">
<Fields>
<ext:RecordField Name="Key" />
<ext:RecordField Name="Value" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</div>
I wonder why the data doesn't show. But taxingTypeStore has the data!