Ver Mensaje Individual
  #12 (permalink)  
Antiguo 24/08/2011, 16:09
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

ASÍ CASI...pero me carga todo junto

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 = @combo1 group by Fecha,Plu,NomProducto,Stock"
com.Parameters.AddWithValue("@combo1", OleDbType.Date.Equals(ComboInventarios.SelectedVal ue))

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


'aquí cargo el datasource y el datamenber del datagrid
DgInventario.DataSource = setda
DgInventario.DataMember = "GeneralAlmacen"
DgInventario.Refresh()