Ver Mensaje Individual
  #22 (permalink)  
Antiguo 25/08/2011, 13:48
guillebomtrasmiti
 
Fecha de Ingreso: noviembre-2010
Ubicación: madrid
Mensajes: 478
Antigüedad: 13 años, 5 meses
Puntos: 5
Respuesta: no me carga el grid con seleccion combo

''cargo el grid con la selección del combo de fechas inventarios
'Public Sub cargainventariocombo()

' Dim adapt As New OleDbDataAdapter
' Dim setda As New DataSet
' Dim com = conexion.CreateCommand


' com.CommandType = CommandType.Text
' com.CommandText = "SELECT Fecha,Plu,NomProducto,Stock From GeneralAlmacen Where Fecha = " & ComboInventarios.Text & " group by Fecha,Plu,NomProducto,Stock"

' ' com.CommandText = "SELECT Fecha,Plu,NomProducto,Stock From GeneralAlmacen Where Fecha = @combo1 group by Fecha,Plu,NomProducto,Stock"
' ' com.Parameters.AddWithValue("@combo1", (OleDbType.Date.Equals(ComboInventarios.SelectedVa lue)))

' adapt.SelectCommand = com
' adapt.Fill(setda, "GeneralAlmacen")


' 'aquí cargo el datasource y el datamenber del datagrid
' DgInventario.DataSource = setda
' DgInventario.DataMember = "GeneralAlmacen"
' DgInventario.Refresh()
'End Sub
' ''muestra en el grid los datos de la fecha seleccionada en el combobox
'Private Sub ComboInventarios_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboInventarios.SelectedIndexChanged
' cargainventariocombo()
'End Sub