Results 1 to 2 of 2

Thread: Is it possible to show both color and text in a combo box ?

  1. #1

    Default Is it possible to show both color and text in a combo box ?

    Hi,
    I want to show both color and text values in a combo box. The colors should be loaded dynamically when I bind a store to the combo box. I am planning to store the color code and text values in a store. I have attached an image as how I want it. Please someone give me some suggestions.

    coloredCombo.png

    coloredCombo2.png

    Thanks,
    Rakesh

  2. #2
    Sencha User
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Hi--

    Absolutely! You can provide a custom template that will be used to display the list items in the drop-down.

    Here's an example from the docs (see the "Custom Item Templates"):
    http://docs.sencha.com/extjs/4.2.3/#...rm/combos.html
    http://docs.sencha.com/extjs/4.2.3/#...mboBox-cfg-tpl

    Thanks!
    Joel

Similar Threads

  1. Replies: 15
    Last Post: 26 Nov 2013, 8:18 AM
  2. How to show data in combo in ellipsis "text text ..."
    By amanind in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 20 May 2011, 9:24 AM
  3. Replies: 1
    Last Post: 19 Apr 2011, 7:57 AM
  4. Show and edit related text but store value text (with a Combo in a Grid)
    By Pachat in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 23 Jan 2010, 11:55 AM
  5. changing text color in grid rows as well as background color
    By dirtdevil in forum Sencha Ext JS Q&A
    Replies: 4
    Last Post: 15 Feb 2009, 9:39 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •