Checking Type of Column

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

  • Posted 8 September 2017, 1:49 pm EST


    I have a grid that has several combobox columns.   I am trying to go through them and see which one is a combo box.

    When I step through the code, " If col.CellType Is cell Then" below, it shows that both col.celltype and cell are both combobox types, but it doesn't enter the procedure after evaluating.

    What am I doing wrong?


    Dim i As Integer

    Dim cell As New FarPoint.Win.Spread.CellType.ComboBoxCellType

    Dim cCbo As New cComboBoxes(ConnectionString)

    Dim col As FarPoint.Win.Spread.Column

    For i = 0 To mfpGrd.ActiveSheet.ColumnCount - 1

    col = mfpGrd.ActiveSheet.Columns(i)

    If col.CellType Is cell Then

    cCbo.ColumnNumber = i

    cFields.ComboTable = mcPhoneType


    End If


  • Replied 8 September 2017, 1:49 pm EST


    The code looks correct. However, I thought you were using MultiColumnComboboxCellType for your columns. If you are assigning the CellType at the column level and the CellType is the ComboboxCellType, then your code should work. Could you post a small zipped project reproducing the issue for us to debug?

Need extra support?

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

Learn More

Forum Channels