How can I display the decimal values ​​in the Editor.

How can I display the decimal values ​​in the Editor.

ingezoneingezone Posts: 20Questions: 8Answers: 0

Link to test case: http://live.datatables.net/gowulize/1/edit
Debugger code (debug.datatables.net):
Error messages shown: https://postimg.cc/V5DksXCH
Description of problem: I have not been able to display in the Editor when the decimal values ​​when the values ​​are zeros.

What should I do so that the decimal values ​​are displayed no matter if the result is zeros ?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Do you mean the 2 decimal places? Your example works (when I assign the name as the row id).

    However, your image suggests to me that your data source doesn't have the two decimal places in the number. You are using the number renderer for the table, which is why it is showing 2dp there, but for Editor, if you want to change the format of the data before it is displayed in the form, you need to use fields.setFormatter.

    Allan

  • ingezoneingezone Posts: 20Questions: 8Answers: 0

    Your answer worked for me, thank you :smile:

Sign In or Register to comment.