I suggest you ...

numbers do not sort correctly when using local array data source

Numbers do not sort correctly when using local array data source. Using the source below you'll notice that the numbers do not sort correctly. Values less than 10 do not sort above numbers greater than 10.

$gridData = array();
foreach( $players as $playerID => $playerName )
{
$floatNum = mt_rand(0, 10000) / 100;

$data = array();
$data['Number'] = $floatNum;

array_push($gridData, $data);
}

$dg = new C_DataGrid($gridData);
$dg->enable_search(true);
$dg->set_caption('Stats');
$dg->set_row_color('#2F3C4E', 'transparent', 'transparent');
$dg->set_pagesize( sizeof($gridData) );
$dg->set_col_format('Number', 'number', array("thousandsSeparator" => ",", "decimalSeparator" => ".", "decimalPlaces" => '2', "defaultValue" => '0.00'));
$dg->enable_rownumbers(true);
$dg->set_dimension(950, '100%');
$dg->display();

8 votes
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Chad shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base