RE:ayuda porfi combo en grilla
No sé si ya lo has solucionado pero por si acaso
En el guille te dan dos soluciones.
1 integrando el combo en el datagrid mediante apis o algo así (ni la miré había lineas y lineas de código ).
2 bastante más fácil y chapucera:
solo tienes que escrbir código en 2 eventos 1 en de la grilla y otro en el combo.
Private Sub MiGrilla_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles MiGrilla.CurrentCellChanged
If MiCombo.Visible = True Then MiCombo.Visible = False
If MiGrilla.CurrentCell.ColumnNumber <> 1 Then Exit Sub
Dim CeldaAlto As Integer = MiGrilla.GetCellBounds(MiGrilla.CurrentCell.RowNumber, MiGrilla.CurrentCell.ColumnNumber).Height
Dim CeldaAncho As Integer = MiGrilla.GetCellBounds(MiGrilla.CurrentCell.RowNumber, MiGrilla.CurrentCell.ColumnNumber).Width
Dim PosicionX As Integer = MiGrilla.GetCellBounds(MiGrilla.CurrentCell.RowNumber, MiGrilla.CurrentCell.ColumnNumber).X + MiGrilla.Left
Dim PosicionY As Integer = MiGrilla.GetCellBounds(MiGrilla.CurrentCell.RowNumber, MiGrilla.CurrentCell.ColumnNumber).Y + DGZonasInteres.Top
MiCombo.Left = PosicionX
MiCombo.Top = PosicionY
MiCombo.Height = CeldaAlto
MiCombo.Width = CeldaAncho
MiCombo.Visible = True
MiCombo.DroppedDown = True
End Sub
Private Sub MiCombo_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CIdTipoZi.SelectedIndexChanged
Dim NomCelda As DataGridCell
Dim Col As DataGridColumnStyle
Dim Cad As String
MiCelda = Me.MiGrilla.CurrentCell
MiGrilla.Item(MiCelda.RowNumber, MiCelda.ColumnNumber - 1) = Me.MiCombo.SelectedValue
MiGrilla.Item(MiCelda.RowNumber, NomCelda.ColumnNumber) = MiCombo.Text
Else
Exit Sub
End If
MiCombo.Visible = False
End Sub
Un saludo