[SOLVED] Different look for row with certain "flag"

[SOLVED] Different look for row with certain "flag"

MrBaseball34MrBaseball34 Posts: 96Questions: 0Answers: 0
edited January 2011 in General
I'd like to change the way a row looks if the row has a certain value in the results it is loaded from.
I want to set the row height to be 3 times larger and set the color to be different than the color that the row is supposed to get via CSS.

The table is "built" from a PHP script (also using smarty) returning data from my DB.
[code]
{foreach from=$results item=result}

{$result[0]}
{$result.inventory_part_number|stripslashes}
{$result.inventory_alt_part_number|stripslashes}
{$result.inventory_condition_code|stripslashes}
{$result.inventory_quantity|stripslashes}
{$result.inventory_description|stripslashes}
{$result.company_name|stripslashes}
{if $result.country eq "US"}{$result.state|stripslashes}{else}{$result.country|stripslashes}{/if}

{/foreach}
[/code]

Replies

  • abbottmwabbottmw Posts: 29Questions: 0Answers: 0
    Check out the fnRowCallback.
    http://datatables.net/usage/callbacks#fnRowCallback

    Ive used this to setup certain cell properties, and row properties.

    -Matthew
  • MrBaseball34MrBaseball34 Posts: 96Questions: 0Answers: 0
    fnRowCallback worked brilliantly.
    Thanks...
This discussion has been closed.