ComboBox.Items.Count is equal 0 after databinding of its Store

  1. #1

    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.

Similar Threads

  1. Replies: 7
    Last Post: Jul 25, 2012, 5:34 PM
  2. Can not select combobox items using store
    By blurken in forum 2.x Help
    Replies: 0
    Last Post: May 14, 2012, 1:23 AM
  3. [CLOSED] [1.0] Tabstrip with dynamicly created items - items.count always 0
    By klaus.schwarz in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 07, 2010, 11:40 AM
  4. [1.0] MultiCombo how to return items.count
    By steve.redmon in forum 1.x Help
    Replies: 0
    Last Post: Jun 11, 2010, 9:51 PM
  5. Count items in a ComboBox?
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Nov 18, 2009, 11:25 AM

Posting Permissions