1. #31
    Ext User
    Join Date
    Jun 2007
    Posts
    4
    Vote Rating
    0
    blafleur is on a distinguished road

      0  

    Default works like a champ!

    works like a champ!


    It works like a champ.. I love it, thanks. Although I did have to make the changes that BigBen4711 suggested to get the correct values to POST.... else it was just posting FFFFFF the default value.

  2. #32
    Sencha User KevinChristensen's Avatar
    Join Date
    Sep 2007
    Posts
    36
    Vote Rating
    0
    KevinChristensen is on a distinguished road

      0  

    Question Using ColorField or ColorPalette in an EditorGridPanel

    Using ColorField or ColorPalette in an EditorGridPanel


    Is there a way to use the ColorField or ColorPalette inside an EditorGrid? I would like to use it similar to how a textField works to allow the user to choose a color and have that value returned back to the cell in the grid.

    This code from the ColumnModel will display the ColorField as expected but I don't know how to get the value of the grid set to the value passed back from the ColorField. I can put a listener on the Editor which gives me the color chosen but I still don't know how to set the value of the grid cell.
    PHP Code:
     {header:'Colors',width:75,sortable:false,dataIndex:'WEB_COLOR_HEX',
        
    editor:new Ext.ux.ColorField({value:'0000FF'})

    }, 
    -- KC
    "There are only 10 types of people in the world, those who understand binary and those who don't."

  3. #33
    Ext User
    Join Date
    Mar 2009
    Posts
    2
    Vote Rating
    0
    Diego Franck is on a distinguished road

      0  

    Default


    Does anyone knows how to pick the hexadecimal value from a database and set it into the colorfield component ? But, i don't wanna show the hexadecimal value on the field.. I need to show the color correspondent.

  4. #34
    Sencha User
    Join Date
    Dec 2008
    Posts
    89
    Vote Rating
    0
    janhov is on a distinguished road

      0  

    Default


    Quote Originally Posted by extJS_learner View Post
    Seems to work well. Thanks for your efforts. One question, how might I attach catch the event of a new color being selected?
    This is a problem for me as well. Nothing happens when I select a new color:

    Code:
    {
                xtype: 'colorfield',
                fieldLabel: 'Color',
                id: 'colorA_cf',
                allowBlank: false,
                width: combo_width,
                value: "#FFFF00",
                listeners: {
                    'select': {
                        fn: function()
                        {
                            alert("!");
                        },
                        scope: this
                    }
                }
            }

  5. #35
    Sencha User
    Join Date
    Dec 2008
    Posts
    89
    Vote Rating
    0
    janhov is on a distinguished road

      0  

    Default


    When I try

    Code:
    menuListeners: {
                    'select': {
                        fn: function()
                        {
                            alert("!");
                        },
                        scope: this
                    }
                }
    the alert fires, but the color doesn't change.. Why?

  6. #36
    Sencha User
    Join Date
    Dec 2008
    Posts
    33
    Vote Rating
    0
    iceblast_01 is on a distinguished road

      0  

    Default


    i get an error when i load the record to the form using form.form.loadRecord(record); have anyone encountered this?
    - nevermind sorry I am using 3.0

  7. #37
    Ext User
    Join Date
    Oct 2010
    Location
    moscow
    Posts
    1
    Vote Rating
    0
    sherza is on a distinguished road

      0  

    Default


    Thank you very much! Your script was very useful for me

  8. #38
    Sencha User
    Join Date
    Oct 2010
    Posts
    1
    Vote Rating
    0
    Jhonatas is on a distinguished road

      0  

    Default


    Its work but see the error :S
    i'm learning ext now
    Attached Images

  9. #39
    Sencha User
    Join Date
    Sep 2010
    Posts
    3
    Vote Rating
    0
    leandro.lopes is on a distinguished road

      0  

    Default


    Not working in IE.

  10. #40
    Touch Premium Member
    Join Date
    Sep 2010
    Location
    UK
    Posts
    54
    Vote Rating
    1
    Joe Kuan is on a distinguished road

      0  

    Default


    Cool extension.

    After some minor changes, I managed to get this working with RowEditorGrid. Two columns, one for setting foreground-color, another for setting background-color, another one to preview the combination of both.

    Here is a screenshot