ComboBoxCellType - Click the ComboBox, Current Value Disappears

Posted by: b2mje112 on 8 September 2017, 1:29 pm EST

  • Posted 8 September 2017, 1:29 pm EST

    <p>        Dim ctComboBoxColumn As New FarPoint.Win.Spread.CellType.ComboBoxCellType<br>        Dim strDesc() As String = {"Correction", "Correct as Submitted", "Delete"}<br>        Dim strData() As String = {1, 2, 3}<br>        ctComboBoxColumn.Items = strDesc<br>        ctComboBoxColumn.ItemData = strData<br>        ctComboBoxColumn.Editable = False<br>        ctComboBoxColumn.AutoSearch = FarPoint.Win.AutoSearch.None<br>        ctComboBoxColumn.EditorValue = FarPoint.Win.Spread.CellType.EditorValue.Index</p><p> </p><p>I then set the celltype of various columns to this celltype.  I set the value of certain cells to 1 - (Correction).</p><p>I run the app and "Correction" is the selected item, but when I click the combo box the current selection disappears and nothing is in the combo box.  Any clues? <br></p>
  • Replied 8 September 2017, 1:29 pm EST

    <p>Nevermind ...</p><p>I was setting the editorvalue to ItemData underneath this (and I didn't see it until now).    Problem solved. <br></p>
  • Replied 8 September 2017, 1:29 pm EST

    <p>What version are you using?  I tested your code and when I click the combobox the list drops down showing the data...</p><p>Dim ctComboBoxColumn As New FarPoint.Win.Spread.CellType.ComboBoxCellType<br>Dim strDesc() As String = {"Correction", "Correct as Submitted", "Delete"}<br>Dim strData() As String = {1, 2, 3}<br>ctComboBoxColumn.Items = strDesc<br>ctComboBoxColumn.ItemData = strData<br>ctComboBoxColumn.Editable = False<br>ctComboBoxColumn.AutoSearch = FarPoint.Win.AutoSearch.None<br>ctComboBoxColumn.EditorValue = FarPoint.Win.Spread.CellType.EditorValue.Index<br><br>FpSpread1.ActiveSheet.Columns(0).CellType = ctComboBoxColumn<br>FpSpread1.ActiveSheet.Cells(0, 0).Value = 0 <br></p>
Need extra support?

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

Learn More

Forum Channels