【Winform】DataGridViewComboBoxCell的SelectIndexChanged事件

    Private Sub Grid_EditingControlShowing(ByVal sender As ObjectByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles Grid.EditingControlShowing
        
If Grid.CurrentCell.ColumnIndex = COL_HINCD Then
            
If Not (TypeOf (e.Control) Is ComboBox) Then Exit Sub
            
Dim cbo As ComboBox
            cbo 
= TryCast(e.Control, ComboBox)
            
If cbo IsNot Nothing Then
                
RemoveHandler cbo.SelectedIndexChanged, AddressOf ComboBox_SelectedIndexChanged
                
AddHandler cbo.SelectedIndexChanged, AddressOf ComboBox_SelectedIndexChanged
            
End If
        
End If
    
End Sub