0

Firstly, Sorry for the long post :)

Im currently creating a training database for use within the business (not done many getting used to coding)

I used MySQLMaestro to construct the datagrid and have modified it to suit most my needs.
however i have one issue that i cant resolve.

at the bottom of a column i can add a count to show the amount of records applied by a search filter.

// View column for name field
            //
            $column = new TextViewColumn('employees_name_name', 'Employees Name', $this->dataset);
            $grid->SetTotal($column, Aggregate::Count);
            $column->SetOrderable(true);
            $handler = new ShowTextBlobHandler($this->dataset, $this, 'name_handler', $column);
            GetApplication()->RegisterHTTPHandler($handler);

where

$grid->SetTotal($column, Aggregate::Count);

sets the count at the footer of the page

Is there a way to also show this value as a percentage??

we currently have 437 employees in our immediate business, of which only 5% can be on training at any one time.

I've added a modified screenshot to help explain..

thanx in advance
KeeF Jukes

Edited by mike_2000_17: Fixed formatting

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by JukesK
0

Could you use simple math? (Count*.05/100).'%'?

Edited by effu: n/a

0

unfortunatley not,
i have tried simple mathes in, PHP, Mysql and java and got no joy from any of it.

I believe the code to be written in a ajax/php blend but cant get it to add the function...

but many thanx for tryin :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.