Cell Status colour change text in Cell

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
reg216uk
Posts: 22
Joined: 2013-09-26 18:45

Cell Status colour change text in Cell

Post by reg216uk » 2014-10-18 07:56

Hello people

Since using the new version of AppGini 5.30 my Status cells wont change the text colour anymore can someone help?

Code: Select all

// modify the status field of the table view query to display 'no' invoices in bold red
$oldArray=$options->QueryFieldsTV;
$options->QueryFieldsTV='';
foreach($oldArray as $field => $caption){
if($field=='`VIDA`.`Status`'){
$options->QueryFieldsTV['IF(`VIDA`.`Status`=\'Pending\', \'<b style="color: red;">Pending!</b>\', IF(`VIDA`.`Status`=\'Loaded\', \'<b style="color: green;">Loaded!</b>\', IF(`VIDA`.`Status`=\'Booked\', \'<b style="color: blue;">Booked</b>\', `VIDA`.`Status`)))']=$caption;
}else{
$options->QueryFieldsTV[$field]=$caption;
}
}
return TRUE;
}
This is the code I would enter into the table php file for the specific table....

Perhaps there is a way to make the entire row change colour instead?

Post Reply