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

  1. #1

    How to set background-color in displayed combobox when i click item

    Hi guys..

    Have a nice day..
    I have a question.. I set background-color in each item.. Now, I want to set background-color in displayed combobox when i click item.

    <ext:ComboBox Flex="1" runat="server" ID="cboColor" Note="Color" NoteAlign="Top"
                            DisplayField="Value" ValueField="Value" Width="200">
                            <Store>
                                <ext:Store runat="server">
                                    <Model>
                                        <ext:Model runat="server">
                                            <Fields>
                                                <ext:ModelField Name="Value" Type="String" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <Items>
                                <ext:ListItem Text="CCFF99" Value="CCFF99" />
                                <ext:ListItem Text="FFFF66" Value="FFFF66" />
                                <ext:ListItem Text="FF3366" Value="FF3366" />
                            </Items>
                            <ListConfig ItemSelector=".x-boundlist-item">
                                <Tpl ID="Tpl2" runat="server">
                                    <Html>
                                        <tpl for=".">
    										<tpl if="[xindex] == 1">
    										        <table width="100%">
    										        </tpl>
    										        <tr class="x-boundlist-item" style="background-color:#{Value}">
    										        <td>{Value}</td>
    										        </tr>
    										        <tpl if="[xcount-xindex]==0">
    										        </table>
    								        </tpl>
    									</tpl>
                                    </Html>
                                </Tpl>
                            </ListConfig>
                        </ext:ComboBox>

    Help me, Please.
    Last edited by dinhhung09138; Jun 21, 2014 at 3:06 AM.

Similar Threads

  1. Replies: 5
    Last Post: Mar 15, 2013, 4:24 AM
  2. [CLOSED] Custom Colors
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Oct 10, 2012, 4:10 PM
  3. Replies: 7
    Last Post: Feb 29, 2012, 11:53 AM
  4. [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
  5. GridView with different row colors
    By flaviodamaia in forum 1.x Help
    Replies: 2
    Last Post: Feb 02, 2011, 12:16 PM

Tags for this Thread

Posting Permissions