jQuery UI Widgets Forums Grid sort string as numbers

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • sort string as numbers #57673

    arkgroup
    Participant

    I have grid with column that have numbers with % sign ( 80%, 12%, 67%, 56% …). Looks like it sorting as string. How can I sort this column as numbers (12%, 56%, 67%, 80%)

    Thanks

    sort string as numbers #57682

    Dimitar
    Participant

    Hello arkgroup,

    Here is our suggestion: your column’s corresponding datafield in the source definition should be with type: "number" and should contain numbers only (no percents). Then, in the column definition, you should set its cellsformat to “p”. This way sorting should be working as expected.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.