[CLOSED] Combobox can't get value when add list item using code behind

  1. #1

    [CLOSED] Combobox can't get value when add list item using code behind

    This code for insert value into cboRegional

    public List<PropertyFinance> obj = PropertyFinanceItemItem.GetDataAll();
    protected void Page_Load(object sender, EventArgs e)
    if (!X.IsAjaxRequest) { List<Ext.Net.ListItem> licol = new List<Ext.Net.ListItem>(); var cboObj = obj.Select(x => x.KODE_REGIONAL).Distinct().OrderBy(x => x); foreach (var item in cboObj) { licol.Add(new Ext.Net.ListItem(item, item)); } licol.Insert(0, new Ext.Net.ListItem("All", "All")); cboRegional.Items.AddRange(licol); cboRegional.Value = "All"; }
    protected void GHRefresh(object sender, StoreReadDataEventArgs e) { string xyz = this.cboRegional.SelectedItem.Text; // result = null xyz = this.cboRegional.Text; // result ='' }
    how to get value string of cboRegional?

    Last edited by Daniil; Oct 21, 2015 at 8:35 AM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi @opacjkt,

    Please provide a full test case to reproduce the issue

    Meanwhile, is there a <form runat="server"> on the page?
  3. #3
    Thanks problem fix, because iam not entered <ext:FormPanel ID="frmpnl" runat="server">

Similar Threads

  1. Combobox Partial String Search for List Item
    By GolchK in forum 1.x Help
    Replies: 15
    Last Post: Jun 01, 2017, 11:51 PM
  2. [CLOSED] Problem to list through item combo from code behind
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Oct 12, 2012, 11:29 AM
  3. Replies: 1
    Last Post: Dec 15, 2010, 3:07 PM
  4. [CLOSED] [1.0] Selecting Combobox expanded list item through Tab key
    By r_honey in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 02, 2010, 4:54 PM
  5. [CLOSED] ComboBox Item List not displaying full Width
    By bfolger in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Aug 24, 2009, 10:12 PM

Posting Permissions