KoolReport's Forum

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

Order option doesn't order by the right way #2579

Open Abdulrahman opened this topic on on Feb 16, 2022 - 1 comments

Abdulrahman commented on Feb 16, 2022

I'm using DataTable and trying to order the table "desc" based on column of numbers. But the package see 6 is bigger than 17! Here is my code:

DataTables::create([
        "dataSource" => $dataStore,
        "themeBase"=>"bs4",
        "cssClass" => ["table" => "table tableOutline reportTable table-bordered table-striped table-hover"],
        "columns" => ["indexColumn" => "No.", "Name", "Phone", "No. of visits", "Last visit"],
        "fastRender" => true,
        "options" => ["paging" => true, "pageLength" => 10, "searching" => true, "colReorder" => true, "order" => [[3,"desc"]], ]

And Here is the output

Abdulrahman commented on Feb 16, 2022

I used on that column meta data

"type" => "num-fmt"

and it worked fine!

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
help needed
solved

DataGrid