У меня есть ProbationComboBox
с SelectedValue
, привязанным к RegistrationBindingSource
, и DisplayMember
, связанным с ProbationBindingSource
.
Когда я вызываю RegistrationBindingSource.ResetCurrentItem()
, свойство SelectedValue
обновляется с правильным значением RegistrationBindingSource.ProbationID()
, но свойство Text
не обновляется.
Вот как я настраиваю привязку данных в ComboBox:
ProbationComboBox.DataBindings.Add(New System.Windows.Forms.Binding( _
"SelectedValue", Me.RegistrationBindingSource, "ProbationID", True))
ProbationComboBox.DataSource = Me.ProbationBindingSource
ProbationComboBox.DisplayMember = "probation"
ProbationComboBox.ValueMember = "id"
Пока я не могу выяснить проблему с моей привязкой, я использую это как временное исправление:
DataRow row = CType(ProbationBindingSource.Current, DataRowView).Row
ProbationComboBox.Text = CType(row, RootNamespace.DataSet.probationRow).probation
Есть идеи?Спасибо!