Oct 25, 2011, 10:02 AM
ComboBox.Items.Count is equal 0 after databinding of its Store
protected void Page_Load(object sender, EventArgs e)
{
if (!Ext.Net.ExtNet.IsAjaxRequest)
{
ServicesCmbStore.DataSource = GetServices().Select(x => new { Key = x.Id, Value = x.Name });
ServicesCmbStore.DataBind();
ServicesCmb.SelectedItem.Value = myTuple.Item1.ToString();
//ServicesCmb.Items.Count == 0 ?????????
}
}
<ext:ComboBox ID="ServicesCmb" runat="server" ValueField="Key" DisplayField="Value">
<Store>
<ext:Store ID="ServicesCmbStore" runat="server">
<Reader>
<ext:JsonReader IDProperty="Key">
<Fields>
<ext:RecordField Name="Key" />
<ext:RecordField Name="Value" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
</ext:ComboBox>
Why is ComboBox.Items.Count equal zero?
Last edited by AlexMaslakov; Oct 25, 2011 at 10:05 AM.