|
-
Oct 20th, 2009, 08:28 AM
#1
Thread Starter
Member
Combobox and checkbox binding???
I have the following code in the Load event of my form.
ARoomsBedsDataTier = New RoomsBedsDataTier
ACottagesDataSet = ARoomsBedsDataTier.GetDataSet
'Set up Room Binding Source
Dim RoomBindingSource As New BindingSource
With RoomBindingSource
.DataSource = ACottagesDataSet
.DataMember = "Rooms"
End With
'Bind the combo box and the check to the Rooms table
With cboRoomName
.DataSource = RoomBindingSource
.DisplayMember = "Room"
.ValueMember = "Room"
'.SelectedIndex = -1
End With
chkJacuzzi.DataBindings.Add("Checked", RoomBindingSource, "Jacuzzi", False)
chkPrivateAccess.DataBindings.Add("Checked", RoomBindingSource, "Private Access", False)
chkFireplace.DataBindings.Add("Checked", RoomBindingSource, "Fireplace", False)
This works, however I want the code to reside in the SelectionChangeCommitted event of my combo box instead. That way there is no initial values in the form when it loads. I have tried many ways to do this but can't seem to get it to work.
Can anyone help??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|