Jun 21, 2014, 2:16 AM
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.
Help me, Please.
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.