MulitColumnComboBox not showing all decimal places

Posted by: sheritt on 8 September 2017, 1:56 pm EST

  • Posted 8 September 2017, 1:56 pm EST

    I have a multi-combobox cell that is bound to a table that has a field with 3 decimal places.

    When the combobox drops down it only displays 2 decimal points.

    How can I make it show all the decimal points?


     Private Sub FillSpreadCombo(ByVal r As Integer)
            Dim ds As New DataSet
            Dim iCol As Integer = 2

            If DatabaseToUse() = BizObjs.DBType.Access Then
                'Access Database
                Dim cFields As New cFieldTableNames
                cFields.GetStrTableName = msTblName
                cFields.ComboTable = msTblName
                SelectStr = cFields.ReturnComboString()
                Dim dc As New OleDb.OleDbConnection(ConnectionString)
                Dim da As New OleDb.OleDbDataAdapter(msSelectStr, dc)


                    Dim mcb As New FarPoint.Win.Spread.CellType.MultiColumnComboBoxCellType()
                    mcb.AutoSearch = FarPoint.Win.AutoSearch.SingleCharacter

                    mcb.DataSourceList = GenerateDataTable(ds) 'ds
                    mfpGrd.ActiveSheet.Cells(r, iCol).CellType = mcb
                    mcb.ColumnEdit = cFields.ReturnDisplayField
                    mcb.DataColumn = 0
                    mcb.ButtonAlign = FarPoint.Win.ButtonAlign.Right
                    mcb.ListWidth = 200
                    mcb.ListOffset = 5

                    mcb.MaxDrop = 10
                    mfpGrd.ActiveSheet.Cells(r, iCol).CellType = mcb

                Catch ex As Exception

                    ''Throw ex


                End Try

            End If

        End Sub


  • Replied 8 September 2017, 1:56 pm EST

    You would need to handle the SubEditorOpening event and cast the SubEditor member of the event args to a FpSpread. Then you can modify the celltype of that column to be a number celltype with 3 decimals.
  • Replied 8 September 2017, 1:56 pm EST

    Can you give me an example please?



  • Replied 8 September 2017, 1:56 pm EST


    I added the following in the SubEditorOpening event and it correctly displays the decimal place (3) in our case:


    Private Sub FpSpread1_SubEditorOpening(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.SubEditorOpeningEventArgs) Handles FpSpread1.SubEditorOpening

            Dim ncell As New FarPoint.Win.Spread.CellType.NumberCellType
            ncell.DecimalPlaces = 3
            CType(e.SubEditor, FarPoint.Win.Spread.FpSpread).ActiveSheet.Columns(1).CellType = ncell

        End Sub


    Hope this helps. Thanks

Need extra support?

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

Learn More

Forum Channels