1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    blueshirts is on a distinguished road

      0  

    Question Unanswered: Change Grid Background Color

    Unanswered: Change Grid Background Color


    Seems like a simple request though I can't seem to find something that works. Is it possible to modify the background color of a cell or the cells in a column? I have seen some examples from prior releases to change the style of a cell though this doesn't seem to work properly. Is there a preferred / optimal approach to doing this?

  2. #2

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    blueshirts is on a distinguished road

      0  

    Default


    The link had some information related to changing an entire row. I would actually like to change the background color for a column. The example below seems to work. The acceptable ways to create a renderer seems difficult to find in the documentation. In order words what are the acceptable parameters that can be passed to this function.

    var myRenderer = function(value, metaData) {
    ....
    metaData.style = "background-color: E8E8E8";
    ....
    };

  4. #4
    Ext JS Premium Member vishalg's Avatar
    Join Date
    Sep 2007
    Location
    Los Angeles, CA
    Posts
    75
    Vote Rating
    0
    vishalg is on a distinguished road

      0  

    Default


    Try tdCls option

    PHP Code:
    {header'Col Header'dataIndex'data-index',  width46tdCls'labRed' }
    ==================================================
    .
    labRed {
    colorred;


  5. #5
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Skirtle has a good article about "Styling Ext Grid Cell" that you should read.