1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    56
    Vote Rating
    0
    dev_java is on a distinguished road

      0  

    Question Change background color of grid's column

    Change background color of grid's column


    Hi,

    I have a grid with three columns and several rows. I have to change the background color of first column as it is non-editable. I tried to change the background color of grid's column by configuring the metaData.css . But it dint get reflected. Please find the piece of code i have done.

    Code:
    //column code
    {header: "Source id", width:70,   menuDisabled : true,dataIndex: 'sourceId',
                        renderer: function(value, metaData, record, rowIndex, colIndex, store) {
                                    metaData.css = 'noneditable-gridCell';
                              return value;
                        }
                    }
    
    //css code
    .noneditable-gridCell{    
        background-color: #FAFAFA;
        }
    Is there any other way to change the color of a particular column in the grid?

    Thanks in advance,
    dev

  2. #2
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,748
    Vote Rating
    106
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      0  

    Default


    Look in the docs for column: http://docs.sencha.com/ext-js/4-0/#!....column.Column

    *hint* config property you're looking for starts with 't'

Thread Participants: 1