TypeComboBoxCurSel property

Posted by: ashok-k on 8 September 2017, 12:58 pm EST

  • Posted 8 September 2017, 12:58 pm EST


    Hi


                      We are upgrading a project from VB6  to VB.NET. While upgrading using wizard i get an error in this line of code. ss_Pod is the name of the spread. There is no equivalent property for TypeComboBoxCurSel  in  .NET


    //ss_Spread.TypeComboBoxCurSel = value


    code is not working in VB.NET


    ss_Spread.row= 2


    ss_Spread.col= 3


    ss_Spread.TypeComboBoxCurSel  = 3


    Ashok


     

  • Replied 8 September 2017, 12:58 pm EST

    Ashok -

    I upgraded a project and did not have any issue with the TypeComboboxCurSel property..

    Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
    ss.Row = 2
    ss.Col = 2
    ss.CellType = FPSpreadADO.CellTypeConstants.CellTypeComboBox
    ss.TypeComboBoxList = "Mastiff" & Chr(9) & "Sheepdog" & Chr(9) & "Terrier" & Chr(9) & "Spaniel" & Chr(9) & "Pointer" & Chr(9) & "Coonhound"
    ss.TypeComboBoxCurSel = 2

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    ss.Col = 2
    ss.Row = 2
    ss.TypeComboBoxCurSel = -1
    End Sub
  • Replied 8 September 2017, 12:58 pm EST

    //


    ss.Row = 2
    ss.Col = 2
    ss.CellType = FPSpreadADO.CellTypeConstants.CellTypeComboBox
    ss.TypeComboBoxList = "Mastiff" & Chr(9) & "Sheepdog" & Chr(9) & "Terrier" & Chr(9) & "Spaniel" & Chr(9) & "Pointer" & Chr(9) & "Coonhound"
    ss.TypeComboBoxCurSel = 2
    //


    This code works fine in VB.   But not in VB.NET win form. Please  tell me  equivalent VB.NET code. TypeComboBoxCurSel  property is not supported in .NET.


    // val = ss.TypeComboBoxCurSel  + 1 


       Will this code   ss.TypeComboBoxCurSel  + 1    return then value next to the current selection?


    pls help me on this....


    Ashok
     

  • Replied 8 September 2017, 12:58 pm EST

    Ashok,


    You would use the SetValue method of the cell to set the index of the item you want selected in the combobox. You can set this value to -1 to clear the selection.

  • Replied 8 September 2017, 12:58 pm EST

    Ashok,


    What product are you using in .NET. If you are using the COM version of Spread, you would continue to use the TypeComboboxCurSel property as you did in VB. If you are using the Spread for Windows Forms product in .NET, then you would use the SetValue method to set the index of the item you want selected to the Cell that has the combobox.

  • Replied 8 September 2017, 12:58 pm EST

    scott


     We are using FarPoint Spread for Windows Forms 3.0 for VS 2005 .   In this product TypeComboboxCurSel property is not there.


                In VB we used  Spread version 6.0.1.1. Now we are migrating that to .NET 2.0.


    i want to replace TypeComboboxCurSel with some othere property to set the value in the combo box cell.

  • Replied 8 September 2017, 12:58 pm EST

    Hello,


    In the .NET product, you set the Value property of the cell to the index of the item you want selected in that combobox.

Need extra support?

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

Learn More

Forum Channels