please help my issue in windows spread grid

Posted by: anoopgs on 8 September 2017, 2:15 pm EST

  • Posted 8 September 2017, 2:15 pm EST

    The Grid has formated columns, the output is to display  in Spread Grid  like below.(000.00 format)

    0.01

    0.10

    1.00

    10.00

    100.00

    I want to remove this formatting on cursor focus like below.

    1

    10

    100

    1000

    10000

     

    I want  spread grid cell same as excel numeric cell type behavior


     


     

  • Replied 8 September 2017, 2:15 pm EST

    Hello,

    You may get the cell's value in order to get the integer value from the cell's text.Please have a look at the code below ,

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim num As New FarPoint.Win.Spread.CellType.NumberCellType
            num.DecimalPlaces = 2
            num.DecimalSeparator = "."
            FpSpread1.ActiveSheet.Columns(1).CellType = num

            FpSpread1.ActiveSheet.Cells(0, 1).Text = "1"
            FpSpread1.ActiveSheet.Cells(1, 1).Text = "12"
            FpSpread1.ActiveSheet.Cells(2, 1).Text = "100"
            FpSpread1.ActiveSheet.Cells(3, 1).Text = "1111"
            FpSpread1.ActiveSheet.Cells(4, 1).Text = "1122"
            FpSpread1.ActiveSheet.Cells(5, 1).Text = "122"
            FpSpread1.ActiveSheet.Cells(6, 1).Text = "155"
        End Sub
        Private Sub FpSpread1_LeaveCell(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.LeaveCellEventArgs) Handles FpSpread1.LeaveCell
            TextBox1.Text = FpSpread1.ActiveSheet.Cells(e.NewRow, e.NewColumn).Value
        End Sub

    I hope it will help you.

    Thanks,

     

Need extra support?

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

Learn More

Forum Channels