jQuery UI Widgets Forums Angular Grid: Sorting and formatting float (decimal) values,

This topic contains 1 reply, has 1 voice, and was last updated by  a2m developer 6 years, 5 months ago.

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

  • a2m developer
    Participant

    Pay Rate column

    {
    cellsalign:"right"
    cellsformat:"d2"
    columntype:"numberinput"
    datafield:"EMPLOYEE_PAY_RATE_ID__PAY_RATE"
    displayfield:"EMPLOYEE_PAY_RATE_ID__PAY_RATE"
    filtertype:"numericfilter"
    minWidth:100
    text: "Pay Rate"
    }

    Pay Rate datafield

    {
    format:"d2"
    name:"EMPLOYEE_PAY_RATE_ID__PAY_RATE"
    type:"float"
    }

    SORTING:

    Ascending sort for Pay Rate results in:
    0.000000
    0.000000
    1100.000000
    1100.000000
    121000.000000
    121000.000000
    14.000000
    15.000000

    How can I get my numeric field to sort correctly? And Why isn’t the cellsformat working?
    Please don’t tell me I have to write a custom sort function to handle sorting float-point values.

    Environment Info:
    Angular 4.3.6
    JQWidgets-framework 4.6.1


    a2m developer
    Participant

    I got it working.. turns out (at least when you use loadServerData ) you need to convert your data into the specific types (ie. date or float).

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

You must be logged in to reply to this topic.