Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/05/2011, 03:25
guillebomtrasmiti
 
Fecha de Ingreso: noviembre-2010
Ubicación: madrid
Mensajes: 478
Antigüedad: 13 años, 5 meses
Puntos: 5
Información cambio cantidad celda datagridview

Hola a todos otra vez, tengo un problemilla, ¿que raro no?, el caso es que tengo un código que me cambia la columna entera del datagridview, pero yo necesitaba cambiar solo la celda que selecciono y no lo consigo, os pongo el código que me cambia la columana entera a ver si alguién me puede ayudar, gracias amigos

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

com.CommandType = CommandType.Text
com.CommandText = "UPDATE IntroduccionDeVentasAhora SET Pts = @Pts where NombreFormaPago <> ('TARJETA CREDITO') and Fecha BETWEEN @FI AND @FF"

com.Parameters.AddWithValue("@Pts", DgTotales.CurrentCell.Value)
com.Parameters.AddWithValue("@FI", Fecha1.Value.Date.ToString("dd/MM/yyyy"))
com.Parameters.AddWithValue("@FF", Fecha2.Value.Date.ToString("dd/MM/yyyy"))

adapt.SelectCommand = com

conexion.Open()
com.ExecuteNonQuery()
'Convert.ToDecimal(CInt(com.ExecuteNonQuery()))
DgTotales.Rows.Remove(DgTotales.CurrentRow)
conexion.Close()