【发布时间】:2014-08-26 09:44:12
【问题描述】:
我有一个函数fill_cboarea(用于填充一个名为cboarea 的组合框)。此函数将调用 Form_load。在到达此@987654324 时@func 调试器转到cboarea_SelectedValueChanged,因为我已经在其中编写了一些代码。下面给出的是错误。
没有为“DataRowView”类型和“Integer”类型定义运算符“”
【问题讨论】:
我有一个函数fill_cboarea(用于填充一个名为cboarea 的组合框)。此函数将调用 Form_load。在到达此@987654324 时@func 调试器转到cboarea_SelectedValueChanged,因为我已经在其中编写了一些代码。下面给出的是错误。
没有为“DataRowView”类型和“Integer”类型定义运算符“”
【问题讨论】:
您需要签到cboarea_SelectedValueChanged
即
Private Sub cboarea_SelectedValueChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cboarea.SelectedValueChanged
Dim item As DataRowView = TryCast(Me.cboarea.SelectedItem, DataRowView)
If item.IsEdit = False Then'check whether the cboarea is in edit mode (on load)
'here your some piece of code
End If
End Sub
【讨论】: