This topic is locked

Table List / Hi-Lite highest number in rows ?

1/12/2015 2:30:29 PM
PHPRunner General questions
N
nti author

Table List / Hi-Lite highest number in rows ?
Anyone know how to get the highest number in table rows to stand-out, example: bold text, yellow background?
Col / field = amt
Example:
There could be 20 rows, and col of numbers, highest number is bold and background yellow...
OR
There could be 20 rows, and col of numbers, highest number is doing backflips... < just joking... however, that would be cool.
Thank you for all replies.

Sergey Kornilov admin 1/12/2015

Yes, it's possible in general, some coding will be required.

  1. In one of events like AfterTableInit or BeforeProcess you need to execute your current SQL query manually and loop through all records finding the value of max number. Once found save it to some session variable like $_SESSION["maxNumber"];
  2. Set 'View as' type of this field to 'Custom' and use something like this:

if ($value==$_SESSION["maxNumber"]) {

$value = "<b>".$value."</b>";

}