Visual Basic.NET - EVENTO EN COMBOBOX EN DATAGRIDVIEW

 
Vista:

EVENTO EN COMBOBOX EN DATAGRIDVIEW

Publicado por Garcia Lorca (23 intervenciones) el 04/11/2008 09:47:51
Hola,

Tengo dentro de un data grid un combobox asociado otra tabla. No consigo averiguar cual es el evento que se activa cuando selecciono un valor.

Lo que quiero es que cuando seleccionen un valor del combobox realizar unas acciones antes de que presionen en cualquier otro campo.

Gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:EVENTO EN COMBOBOX EN DATAGRIDVIEW

Publicado por Harold V. (411 intervenciones) el 05/11/2008 00:07:53
'Ejecutamos sentencias SQL seleccionando un item de un combo box y la mostramos dinamicamente.

'El combo esta dentro de un datagridview

Private Sub GridD_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles GridD.CellValueChanged

'columna que contiene el combobox
If GridD.Columns(e.ColumnIndex).Name = "DOC" Then

If e.RowIndex >= 0 Then
Dim ComboCell As DataGridViewComboBoxCell = CType(GridD.Rows(e.RowIndex).Cells("DOC"), DataGridViewComboBoxCell)

'si se selecciono algo del combo
If Not IsNothing(Me.GridD.CurrentRow.Cells("DOC").Value) Then

End If

GridD.Invalidate()
End If
End If

End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar