tashiduks
Member
- Joined
- Apr 19, 2010
- Messages
- 22
- Programming Experience
- Beginner
HI Everyone,
I can bind other value except with combo box line:
Please help me, where i do the wrong?
VB.NET:
Private Sub DataBinding()
Try
Dim bsTableName2 As String
bsTableName2 = "dbo.hrBranchSetup"
brCode.DataBindings.Clear()
brCode.DataBindings.Add(New Binding("Text", ds.Tables(bsTableName2), "BranchCode"))
brName.DataBindings.Clear()
cboOrganization.DataBindings.Add(New Binding("SelectedValue", ds.Tables(bsTableName2), "OsID"))
cboOrganization.DataBindings.Clear()
brName.DataBindings.Add(New Binding("Text", ds.Tables(bsTableName2), "BranchName"))
bsOnlineYNCheckBox.DataBindings.Clear()
bsOnlineYNCheckBox.DataBindings.Add(New Binding("Checked", ds.Tables(bsTableName2), "OnLineBrYN"))
Catch ex As Exception
MessageBox.Show("Error No : " & Err.Number & vbCrLf _
& "Error : " & ex.Message & vbCrLf _
& "Source : " & Err.Source & vbCrLf _
, "System Message", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
I can bind other value except with combo box line:
VB.NET:
cboOrganization.DataBindings.Add(New Binding("SelectedValue", ds.Tables(bsTableName2), "OsID"))
cboOrganization.DataBindings.Clear()
Please help me, where i do the wrong?