Hybrid View

  1. #1
    Ext JS Premium Member
    Join Date
    Aug 2010
    Location
    The Netherlands
    Posts
    93
    Vote Rating
    0
    rkaat is on a distinguished road

      0  

    Default Add color to column property grid

    Add color to column property grid


    Hey,

    I am struggling with this problem for a while now. I have a property grid, and I would like to give the 1st column a background color.

    The API Docs say that I can place a renderer on a column by retrieving it's columnmodel. But when I try to do that it doesn't work. Here is my code:
    Code:
    pgrid.getColumnModel().setRenderer(0, function(value, metadata, record, row, col, store){
        metadata.attr = 'style="background-color:#FF00FF;"'; 
        return value;
    });
    When I try to use the above method on an EditorGridPanel, it does work. It seems that I can't place a renderer on a column in a property grid. Is there a way to give the 1st column in the property grid a background-color ?

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Why not use a simple css rule?
    Code:
    .x-props-grid .x-grid3-td-name {
      background-color: #f0f;
    }

Similar Threads

  1. changing the grid column header color
    By stmgold in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 30 Jul 2009, 9:51 AM
  2. dynamic change column color for grid
    By zhiliang in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 21 May 2008, 1:26 AM
  3. [Solved]change column color of single row(grid column names row)
    By amey7p in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 14 Feb 2008, 3:52 AM
  4. Replies: 0
    Last Post: 8 Jan 2008, 4:40 AM
  5. Column color & Grid
    By Xcar in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 26 Sep 2007, 12:17 AM

Thread Participants: 1

Tags for this Thread