Setting Row Color

Setting Row Color

lesljrlesljr Posts: 4Questions: 2Answers: 0
edited March 14 in Free community support

This might have been asked before, but I don't see the answer in the forum. I want to change the row color after a user performs an update. Here is what I've tried. The rows have odd or even in the class

I get the row with var

_row = _mytable.row(_rowindex).node();

I've tried this but it messes up the formatting.


I've tried this below ,but the background color(odd,even) overrides the new class that I add.


I'm sure this is simple, but I can't figure it out. Can you point me in the right direction?


  • kthorngrenkthorngren Posts: 5,504Questions: 19Answers: 1,226

    See if this example helps:


  • lesljrlesljr Posts: 4Questions: 2Answers: 0

    That is similar to what I'm doing. The problem I'm running into is The table is striped and has quite a bit of CSS. it has odd / even rows.

    <tr> role="row" class="odd">...</tr>
    <tr> role="row" class="even">...</tr>
    <tr> role="row" class="odd">...</tr>

    Do I need to create a class and force background-color !important ?

  • colincolin Posts: 4,624Questions: 0Answers: 814

    Hi @lesljr ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.



Sign In or Register to comment.