How can i sort Jquery Datatable currency Column properly?

How can i sort Jquery Datatable currency Column properly?

DankanDankan Posts: 8Questions: 3Answers: 0

I am using Datatables Version 1.10.12 and jquery-1.11.1
My currency column doesn't sort properly,below is the code I am using to sort

$(document).ready( function () { $('#notSoCoolGrid').DataTable({ "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], columnDefs: [{ type: 'currency', targets: 1 }], "aaSorting": [[ 2, 'asc' ]] } ); } );

And I am getting as shown below for my currency column.Please note brackets( ) are considered negative number

($75.00) USD
($108.87) USD
($249.44) USD
($1,000.00) USD
£899.00 GBP
$905.00 AUD
£830.65 GBP
$825.00 USD
£59.67 GBP

This discussion has been closed.