Decimal point in NumberCellType problem

Posted by: JackSun on 22 April 2019, 7:58 pm EST

  • Posted 22 April 2019, 7:58 pm EST

    I have a grid with number in one of the columns. The number is with 4 decimals. Here is my code:

    Dim tcell As New FarPoint.Win.Spread.CellType.NumberCellType
    tcell.DecimalPlaces = 4
    tcell.DecimalSeparator = "."
    tcell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes
    tcell.NegativeFormat = FarPoint.Win.Spread.CellType.NegativeFormat.NegativeSignAfter
    tcell.ShowSeparator = True
    tcell.Separator = ","
    tcell.FocusPosition = CellType.EditorFocusCursorPosition.SelectAll

    When the cell get focused - i am able to enter the number (for example 1500.45) and when i hit the period in order to enter fraction (45), the whole text is selected (blue) and the next number i click erased the 1500 and is typed to the cell, so the cell end up with the value 45.00.

    The only way to enter the fraction is to move with the right arrow to the first number in the fraction area.

    what is set wrong ? how to fix this to enter number normally (1500.45)
  • Marked as Answer

    Replied 29 April 2019, 6:07 pm EST

    Hello,

    Apologies for missing your post.
    I used your code to test the behavior you are mentioning, however at my end, focus moves to decimal part of the number upon pressing the period '.' key and does not erase the value. See attached video.
    Are you following some other steps while facing the issue? I used 12.45.20181.0 version, what version are you using?

    Thanks,
    Ruchir
    DecimalValues_Spread.zip
Need extra support?

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

Learn More

Forum Channels