[SOLVED] Different look for row with certain "flag"
[SOLVED] Different look for row with certain "flag"
MrBaseball34
Posts: 96Questions: 0Answers: 0
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]
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]
This discussion has been closed.
Replies
http://datatables.net/usage/callbacks#fnRowCallback
Ive used this to setup certain cell properties, and row properties.
-Matthew
Thanks...