DecimalPlaces = 1 in NumberCellType, If the value is 1.0, I want to display 1

Posted by: puhehezz on 10 March 2019, 11:43 am EST

    • Post Options:
    • Link

    Posted 10 March 2019, 11:43 am EST

    Hi,

    I used the NumberCellType in fpspread winforms.

    DecimalPlaces is 1.

    If the value is 1.0, I want to display 1.

    That is, if the end of the decimal point is zero, I don’t want to display zero.

    ex)

    1.0 → 1

    1.5 → 1.5

    1.35 → 1.35

    1.30 → 1.3

    The code is as follows,

    Dim Num As New FarPoint.Win.Spread.CellType.NumberCellType

    Num.DecimalPlaces = 1

    Num.MaximumValue = 100

    Num.MinimumValue = 0

    FpSpread.ActiveSheet.Columns(iCol).CellType = Num

  • Posted 10 March 2019, 3:57 pm EST

    Num.FixedPoint = False

    I found it.

  • Posted 10 March 2019, 4:34 pm EST

    Hello,

    We are glad to know that your issue has been resolved.

    Thanks,

    Reeva

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels