Results 1 to 3 of 3

Thread: addRowCls() issue, no change visible

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    92
    Answers
    6
    Vote Rating
    0
      0  

    Default Answered: addRowCls() issue, no change visible

    I'm trying to change a given row in my grid so that it is green. I'm using the addRowCls() function:
    Code:
                                    grid.getView().addRowCls(row,'green-row');
    Here is my css for green-row:
    Code:
    .green-row {
            background color: #99CC99 !important;
    }
    Which is included in my app.js file:
    Code:
            <link rel="stylesheet" type="text/css" href="format.css">
    In firebug, I can see rows in my table get changed when I run my addRowCls function on them. They go from:
    <tr class="x-grid-row">
    to:
    <tr class="x-grid-row green-row">

    But the row's appearance doesn't change. Is my css wrong?

  2. Try with this CSS instead.

    Code:
    .green-row .x-grid-cell {
            background-color: #99CC99 !important;
    }
    Table Row (tr tags) can't have a background color, but all of the cells (td tags) can. So this should work for you.

  3. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505
    Vote Rating
    255
      1  

    Default

    Try with this CSS instead.

    Code:
    .green-row .x-grid-cell {
            background-color: #99CC99 !important;
    }
    Table Row (tr tags) can't have a background color, but all of the cells (td tags) can. So this should work for you.

  4. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    92
    Answers
    6
    Vote Rating
    0
      0  

    Default

    yes that worked, thank you!

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
  •