Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    what is the good way to roundoff the listGrid field?

    this is how we i am formating the edited value of listgrid field upto the desired precision value

    formatEditorValue: "isc.Format.toUSString(value, record.precision)",

    so the formatted value looks like 1,000 for all the values more than 999
    problem is that whenever we try to edit the above for greater than 999 it gives an error sign, yellow triangle warning sign, statting that enter decimal values since toUSFormat puts comma as well.

    what is the good way to roundoff the listGrid field?

    #2
    If you supply a formatEditorValue that, like this one, makes the value no longer a valid number, then you need a parseEditorValue() as well that parses it.

    Generally the recommendation (and the common behavior in other apps) is that commas do not show in the editor, only when not editing.

    Comment


      #3
      i am not too keen to use formatEditorValue, like this, for edited value. my only requirement is to round off the edited value upto certain decimal and keeping the the value as number. is there any way other than using formateditor and parseEditor

      Comment


        #4
        Sorry, we don't follow, but it sounds like what you really want is a validator such as floatRange or floatPrecision.

        Comment

        Working...
        X