How to set the colors for ext.net Combobox to each items

  1. #1

    How to set the colors for ext.net Combobox to each items

    ur done in Calendar page in Calendar: Combo box i want also same how to doing that.

    pls help me....
  2. #2
  3. #3
    Above ur saying it is working but i m not selected the items.how to select the value in items
    pls help me...
  4. #4
    <ext:ComboBox Flex="1" runat="server" ID="cboColor" Note="Color" NoteAlign="Top">
                <Items>        
                    <ext:ListItem Text="Blue " Value="Blue" />
                    <ext:ListItem Text="Pink " Value="Pink" />
                    <ext:ListItem Text="Peach " Value="Peach" />
                    <ext:ListItem Text="Light Green " Value="Green" />
                    <ext:ListItem Text="Light Brown " Value="Brown" />
                    <ext:ListItem Text="Voilet " Value="Voilet" />            
                </Items>
                 <Template runat="server">
                <Html>
                    <tpl for=".">               
                        <h1 style="color:{[values.value == 'Blue' ? '#306DA6' : values.value == 'Pink' ? '#B6A980' : values.value == 'Green' ? '#86A723': values.value == 'Peach' ? '#8FBC8F': values.value == 'Brown' ? '#7F0000': values.value == 'Voilet' ? '#808000' : 'black']}">{text}</h1>
                    </tpl>
                </Html>
            </Template>
            </ext:ComboBox>
    Above code its working but i m not unable to selected any items.
    Last edited by Daniil; Feb 16, 2011 at 1:17 PM. Reason: Please use [CODE] tags
  5. #5
    i have solved the problem.it's working now..:p
  6. #6
    Thanks for the update.
  7. #7
    Had the same issue as the op, where you can not select the items in the drop down.

    Answer is to add
    ItemSelector="div.search-item"
    to the combo box.

    and

    <Template runat="server">
    <Html>
    <tpl for=".">
    <div class="search-item" rest of div, etc >
    </tpl>
    </Html>
    </Template>
  8. #8
    Thanks for the sharing the solution, it might help some on the forums in the future.

Similar Threads

  1. ColorPalette custom colors
    By cwolcott in forum 1.x Help
    Replies: 3
    Last Post: Jan 09, 2012, 10:15 AM
  2. [CLOSED] Combobox: How to remove the duplicate items in the combobox?
    By csssi_coolite in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 09, 2011, 9:34 AM
  3. GridView with different row colors
    By flaviodamaia in forum 1.x Help
    Replies: 2
    Last Post: Feb 02, 2011, 12:16 PM
  4. GridPanel line colors
    By flaviodamaia in forum 1.x Help
    Replies: 2
    Last Post: Feb 06, 2009, 2:58 PM
  5. Combobox Items bug ?
    By fabiomarcos in forum 1.x Help
    Replies: 3
    Last Post: Dec 26, 2008, 4:00 PM

Posting Permissions