jQuery UI Widgets Forums TreeGrid cellsFormat

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  admin 1 month, 4 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    cellsFormat Posts
  • cellsFormat #135177

    qx5
    Participant

    When I define a column like this:
    {text:”number”,dataField:”number”,width:”8%”,cellsFormat:”f2″}

    As observed, the cellsFormat is set to F2, and when a number like 1.11111 is entered into a cell within this column.
    The list displays it as 1.11, however, when using the getCellValue method to retrieve the data, it returns 1.11111.

    How can I solve it? Thank you for your help

    cellsFormat #135183

    admin
    Keymaster

    Hi qx5,

    The getCellValue method returns the data bound value, not the displayed and formatted text. If you want to format the data bound value, you can use the dataAdapter for that purpose. It supports number and date formatting in its API like the formatNumber(value, format) function.

    Best regards,
    Peter

    jQWidgets Team
    https://www.jqwidgets.com/

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

You must be logged in to reply to this topic.