latest version of koolreports 5.0.4
I am having the following sorting problems using dataGrid
this does not change if I set my column type to number, text, string or no type and I have no additional sorting configured.
number only in column
100
1000
1100
1200
1300
200
number before text and spacing between them
100 some street
10000 some street
1001 some street
200 some street
column with letter in front the number no spacing
M1
M10
M11
M12
M5
M6
I am using the default setting that came with the koolreports download and are used to generate the example reports.
Alphabetically it sorts fine, this is only happening with numbers.
<?php
DataTables::create(array(
"dataSource"=>$this->dataStore("alpha_report"),
"showFooter"=>true,
"cssClass"=>array(
"table"=>"table table-striped table-bordered",
"tr"=>"cssItem",
// Column Data Position
"td"=>function($row,$colName)
{
if ($colName=="HI")
{
return "text-right";
}
},
"th"=>function($colName) {
return $colName;
},
//Header Data Position
"th"=>function($colName)
{
if (in_array($colName,array("Name")))
{
return "text-center";
}
},
),
"plugins"=>["Buttons"], //KeyTable SearchPanes
"fastRender"=>true,
"options"=>array(
"dom"=>'Bfrtip',
"buttons"=>["csv", "pdf", "print"],
"searching"=>true,
"colReorder"=>true,
"fixedHeader"=>true,
"select"=>true,
"autoWidth"=>false,
),
"columns"=>array(
"Name",
"Address"=>array(
"label"=>"Address",
"type"=>"string"
),
"Acc"=>array(
"label"=>"Acc",
"type"=>"text",
),
"Made",
"Af-Tm"=>array(
"label"=>"Af/Tm",
"type"=>"string"
),
"HI"=>array(
),
"Balance"=>array(
"label"=>"Balance",
"type"=>"currency",
"footer"=>"sum",
"decimals"=>2,
"decimalPoint" => ".",
"thousandSeparator" => "",
),
"Trm",
"PastDue",
"RenewHI"=>array(
"label"=>"RenewHI",
"type"=>"text",
),
"NetProc",
"Work",
),
));