Visual Basic.NET - ayuda porfi combo en grilla

 
Vista:

ayuda porfi combo en grilla

Publicado por graciela (3 intervenciones) el 03/01/2007 17:34:31
tengo que definir un combo dentro de una grilla y no me sale , estoy definiendo algo mal y se cuelga todo.
Me dijeron que lo tengo que definir asi pero el resto ni idea infragistics.win.ultrawinGrid.UltraDropDown
SI alguien sabe y me puede ayudar mil 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:ayuda porfi combo en grilla

Publicado por Batilo (49 intervenciones) el 05/01/2007 16:14:38
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
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