G
Guest
Hello all,
I can't seem to set the value member properly in code... I'm using a
ComboBox in DropDownList mode:
Private Class ApplicationsComboBoxItem
Private _Name As String
Private _Application As ApplicationWorker
Public Sub New(ByVal Name As String, ByVal Application As
ApplicationWorker)
_Name = Name
_Application = Application
End Sub
Public ReadOnly Property Name() As String
Get
Return _Name
End Get
End Property
Public ReadOnly Property Value() As ApplicationWorker
Get
Return _Application
End Get
End Property
End Class
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
ApplicationsComboBox.DisplayMember = "Name"
ApplicationsComboBox.ValueMember = "Application" 'Doesn't set
properly for some reason???
ApplicationsComboBox.SelectedIndex = 0
End Sub
Any ideas?!?!?!?!?!
Thanks!
I can't seem to set the value member properly in code... I'm using a
ComboBox in DropDownList mode:
Private Class ApplicationsComboBoxItem
Private _Name As String
Private _Application As ApplicationWorker
Public Sub New(ByVal Name As String, ByVal Application As
ApplicationWorker)
_Name = Name
_Application = Application
End Sub
Public ReadOnly Property Name() As String
Get
Return _Name
End Get
End Property
Public ReadOnly Property Value() As ApplicationWorker
Get
Return _Application
End Get
End Property
End Class
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
ApplicationsComboBox.DisplayMember = "Name"
ApplicationsComboBox.ValueMember = "Application" 'Doesn't set
properly for some reason???
ApplicationsComboBox.SelectedIndex = 0
End Sub
Any ideas?!?!?!?!?!
Thanks!