KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Problem with sorting in DataGrid #637

Closed Ant Klad opened this topic on on Jan 30, 2019 - 1 comments

Ant Klad commented on Jan 30, 2019

When I use sort with the sort buttons in the header of the DataGrid and the column content is numbers they are not sorted as numbers but as strings. For example 994,50 808,50 444,00 92,00 5,00 5.244,50 4.765,50 1.771,00 0,00

The column type is specified as number for the column : "ItemSumPrice"=>array(

			"type"=>"number",
			"decimals"=>2,
			"dec_point"=>",",
			"thousand_sep"=>".",
			"cssStyle"=>"text-align:right;width:100px;white-space:nowrap",
            "label"=>"Τζίρος(€)",
			"footer"=>"sum",
		),

If however I remove the "dec_point"=>",", "thousand_sep"=>"." specifications then they sort corectly. Thus it seems that it changes the type to string when displaying the data but does not take this into account when sorting.

KoolReport commented on Feb 2, 2019

Please refer to this topic!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
bug

DataGrid