Problem sorting across 3 columns
Problem sorting across 3 columns
I need to sort a data table by 3 columns, first by a column containing decimals in a x.x format then a last name then first name column
the problem that i am having is the decimal column has may duplicate codes across many records for example there may be 20 1.1, 15 2.1
the columns by themselves sort correctly and the also sort correctly when sorted by last name > first name > decimal column
i want it to sort correctly like this
decimal lname fname
1.1 adams adam
1.1 adams bob
1.1 bones leonard
2.1 andrews amy
2.1 arthur james
2.1 brutus marcus
but instead the names will be sorted randomly
1.1 bones leonard
1.1 adams adam
1.1 adams bob
2.1 andrews amy
2.1 brutus marcus
2.1 aurthur james
i need it to sort correctly to parallel an navigation page that navigates in the same sorting order(which it does correctly)
so when the user clicks on the first row of the data table it will be the first record in the navigation page, when the click next it goes to the one that shows second on the datatable.
i am currently sorting by using the "aaSorting": [[12, 'asc'], [2, 'asc'], [3, 'asc']], method
the problem that i am having is the decimal column has may duplicate codes across many records for example there may be 20 1.1, 15 2.1
the columns by themselves sort correctly and the also sort correctly when sorted by last name > first name > decimal column
i want it to sort correctly like this
decimal lname fname
1.1 adams adam
1.1 adams bob
1.1 bones leonard
2.1 andrews amy
2.1 arthur james
2.1 brutus marcus
but instead the names will be sorted randomly
1.1 bones leonard
1.1 adams adam
1.1 adams bob
2.1 andrews amy
2.1 brutus marcus
2.1 aurthur james
i need it to sort correctly to parallel an navigation page that navigates in the same sorting order(which it does correctly)
so when the user clicks on the first row of the data table it will be the first record in the navigation page, when the click next it goes to the one that shows second on the datatable.
i am currently sorting by using the "aaSorting": [[12, 'asc'], [2, 'asc'], [3, 'asc']], method
This discussion has been closed.