podrian ayudarme???
el datagridview tiene los datos en el, yo mismo los ingrese desde una base de datos en Access pero ahora quiero sacar un dato en especifico y me sale con que la celda de donde quiero el dato, no tiene nada. o eso es lo que entiendo...
aqui les dejo una fraccion del codigo que tengo...
Cita:
espero puedan ayudarme... de antemano muchas gracias.... If usr <> "" Then
'valida usuario...
validaruss(usr)
DataGridView1.DataSource = txtret
'obtener el numero de usuarios registrados
x = DataGridView1.Rows.Count
For i = 0 To x - 1 Step 1
'tmp = DataGridView1.CurrentCell.(i, 0)
Autuss = DataGridView1.CurrentCell.GetEditedFormattedValue( i, 0) <------------- este es el que me esta dando problemas...
If usr = Autuss Then
'If usr = DataGridView1.
validarpss(usr)
DataGridView1.DataSource = txtret
y = DataGridView1.Rows.Count
For h = 0 To y - 1 Step 1
autpss = DataGridView1.CurrentCell.GetEditedFormattedValue( h, 0)
If autpss = psw Then
flagret = True : h = y + 1
End If
Next
z = 0 : i = x + 1
If flagret = True Then
Admin.Show()
Me.Close()
Else
MsgBox("Contraseña incorrecta", MsgBoxStyle.Critical, "Error")
End If
Else
z = z + 1
If z >= x Then
MsgBox("Usuario no existente", MsgBoxStyle.Critical, "Error")
End If
End If
Next
Else
MsgBox("El campo debe de terner un nombre de usuario valido", MsgBoxStyle.Critical, "Error")
End If
'valida usuario...
validaruss(usr)
DataGridView1.DataSource = txtret
'obtener el numero de usuarios registrados
x = DataGridView1.Rows.Count
For i = 0 To x - 1 Step 1
'tmp = DataGridView1.CurrentCell.(i, 0)
Autuss = DataGridView1.CurrentCell.GetEditedFormattedValue( i, 0) <------------- este es el que me esta dando problemas...
If usr = Autuss Then
'If usr = DataGridView1.
validarpss(usr)
DataGridView1.DataSource = txtret
y = DataGridView1.Rows.Count
For h = 0 To y - 1 Step 1
autpss = DataGridView1.CurrentCell.GetEditedFormattedValue( h, 0)
If autpss = psw Then
flagret = True : h = y + 1
End If
Next
z = 0 : i = x + 1
If flagret = True Then
Admin.Show()
Me.Close()
Else
MsgBox("Contraseña incorrecta", MsgBoxStyle.Critical, "Error")
End If
Else
z = z + 1
If z >= x Then
MsgBox("Usuario no existente", MsgBoxStyle.Critical, "Error")
End If
End If
Next
Else
MsgBox("El campo debe de terner un nombre de usuario valido", MsgBoxStyle.Critical, "Error")
End If