我想知道如何在 vb.net 中使用 DataGridViewComboBoxEditingControl
当用户从我配置的 datagridviewcomboboxcolumn 中选择一个项目时,我需要一个 routteen 来运行。我不确定如何将对象附加到我手动创建的列
我已经从互联网上的示例中实现了以下内容,但这似乎仅在用户单击列中的组合框时触发。
Private Sub dgvTicketDetail_EditingControlShowing(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles dgvTicketDetail.EditingControlShowing
Dim editingComboBox As ComboBox = TryCast(e.Control, ComboBox)
If editingComboBox IsNot Nothing Then
AddHandler editingComboBox.SelectedValueChanged, AddressOf EditingComboBox_DropDown
End If
End Sub
Private Sub EditingComboBox_DropDown(ByVal sender As System.Object, ByVal e As System.EventArgs)
Debug.WriteLine("A ComboBox in the DataGridView just dropped down.")
End Sub
任何帮助将不胜感激,因为我似乎找不到很多参考资料
提前致谢