Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter TheChosenWong

    (@thechosenwong)

    Forgot to add that in custom commands I tried looking up solutions and used the following:

    "aoColumnDefs": [ { "iDataSort": 0, "aTargets": [ 0 ] } ]

    to order the first column with itself (A lot of examples show using hidden values so it was the closest example I could find)

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The quickest solution for this should indeed be a “Custom Command” for the DataTables JS library. Please try this, which will perform an initial descending sort on the first column:

    "aaSorting": [[0,'desc']]

    Regards,
    Tobias

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sorting Columns from Largest to Smallest with values pulled from an API’ is closed to new replies.