[CLOSED] Problem using icon comboBox

  1. #1

    [CLOSED] Problem using icon comboBox

    Hi,

    I am attaching a screen example showing a problem that I have using the comboBox with icons.

    
    
    
    
    protected void Page_Load(object sender, EventArgs e)
    
    
    {
    
    
    if (!X.IsAjaxRequest)
    
    
    {
    
    
    createLanguagesDataSource();
    
    
    }
    
    
    }
    
    
    }
    
    
    
    
    protected void createLanguagesDataSource()
    
    
    {
    
    
    this.StoreLanguages.DataSource = new object[]
    
    
    {
    
    
    new object[] { ResourceManager.GetIconClassName(Icon.FlagUs), "English", "en-US"},
    
    
    new object[] { ResourceManager.GetIconClassName(Icon.FlagUs), "Espanol", "es-ES"}
    
    
    };
    
    
    this.StoreLanguages.DataBind();
    
    
    ResourceManager1.RegisterIcon(Icon.FlagUs);
    
    
    ResourceManager1.RegisterIcon(Icon.FlagEs);
    
    
    }
    
    
    
    <ext:Store ID="StoreLanguages" runat="server">
    
    
    <Reader>
    
    
    <ext:ArrayReader>
    
    
    <Fields>
    
    
    <ext:RecordField Name="iconCls" />
    
    
    <ext:RecordField Name="name" />
    
    
    <ext:RecordField Name="culture" />
    
    
    </Fields>
    
    
    </ext:ArrayReader>
    
    
    </Reader> 
    
    
    </ext:Store>
    
    
    
    
    <ext:ComboBox ID="ComboBoxLANGUAGEField" 
    
    
    runat="server" 
    
    
    StoreID="StoreLanguages" 
    
    
    Editable="false"
    
    
    TypeAhead="true" 
    
    
    Mode="Local" 
    
    
    TriggerAction="All"
    
    
    DisplayField="name"
    
    
    ValueField="culture"
    
    
    Cls="textControlBackImage"
    
    
    >
    
    
    <Template ID="Template1" runat="server">
    
    
    <Html>
    
    
    <tpl for=".">
    
    
    <div class="x-combo-list-item icon-combo-item {iconCls}">
    
    
    {name}
    
    
    
    
    
    
    </tpl>
    
    
    </Html>
    
    
    </Template> 
    
    
    <Listeners>
    
    
    <Select Handler="this.setIconCls(record.get('iconCls'));" />
    
    
    </Listeners> 
    
    
    <DirectEvents>
    
    
    <Select OnEvent="ComboBoxLANGUAGEFieldSelect" />
    
    
    </DirectEvents> 
    
    
    </ext:ComboBox>
  2. #2

    RE: [CLOSED] Problem using icon comboBox

    Hi,

    I don't see the image
  3. #3

    RE: [CLOSED] Problem using icon comboBox

    I attached the image
  4. #4

    RE: [CLOSED] Problem using icon comboBox

    Hi,

    Did you define 'icon-combo-item' css rule on the page?

    See example in the SVN

    Ext.Net.Examples\Examples\Form\ComboBox\IconCombo\ Default.aspx
  5. #5

    RE: [CLOSED] Problem using icon comboBox

    Hi Vladimir,

    That was the problem.

    Thanks,

Similar Threads

  1. [CLOSED] MVC Icon ComboBox
    By RCM in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Apr 26, 2012, 12:58 AM
  2. Combobox with Icon
    By Maia in forum 1.x Help
    Replies: 7
    Last Post: Sep 03, 2010, 5:32 PM
  3. Replies: 5
    Last Post: Mar 05, 2010, 3:15 PM
  4. [CLOSED] Refresh icon on combobox
    By reinout.mechant@imprss.be in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 29, 2009, 6:14 AM

Posting Permissions