Changing the background color

Changing the background color

arka_dearka_de Posts: 3Questions: 0Answers: 0
edited July 2011 in General
How can I change the background color of a entire row in a data table.I am really in a mess please help me soon as possible.Thanks in advance

Replies

  • versakversak Posts: 26Questions: 0Answers: 0
    CSS.
    [code]
    table tr td {
    background-color: #ff0000;
    }
    [/code]
  • GregPGregP Posts: 500Questions: 10Answers: 0
    If you need to use JS logic to single out a specific row, the best point of insertion is probably the row callback (fnRowCallback: http://datatables.net/usage/callbacks#fnRowCallback).

    If it's not based on JS logic, advanced CSS selectors will still give you some control; for example, the nth-child selector (Googling should reveal tonnes of tutorials).

    If you can tell us which row needs to have its background modified and why (in other words, "what is the use case?") we can probably help you out a bit better.
  • arka_dearka_de Posts: 3Questions: 0Answers: 0
    GregP thanks a lot for your kind help.Yesterday only I have implemented that fnDrawCallback.It is working fine now.Thanks a lot versak for ur feedback.
  • logeloge Posts: 15Questions: 1Answers: 0
    It would have been nice if you would have provided the code so that others can benefit.
This discussion has been closed.