Research datagrid using bank.mdb vb.net
Personnel is with a serious problem in trying fzr a research in the datagrid ...preciso to compare three textbox with three columns in the grid and non to getting. Somebody oh it can help me. I already tried of everything more I don't get.
Use
banco.mdb
for filling the grid
It follows my code oh not this making anything, this code oh it only works if I fill the datagrid without using banco.mdb.
Somebody can tell me the one that this acontencendo!
.....................
"""Pessoal estou com um problema sério em tentar fzr uma pesquisa no datagrid...preciso comparar tres textbox com tres colunas no grid e não to conseguindo. Alguém ai pode me ajudar. Já tentei de tudo mais não consigo.
Uso banco.mdb pra preencher o grid
Segue o meu código ai mais não esta fazendo nada, este código ai só funciona se eu preencher o datagrid sem usar o banco.mdb.
Alguém pode me dizer o que esta acontencendo!"""
......................
For i = 0 To DataGrid1.Rows.Count - 1
If DataGrid1.Rows(i).Cells(1).Value = textbox1.Text AndAlso _
DataGrid1.Rows(i).Cells(2).Value = textbox2.Text AndAlso _
DataGrid1.Rows(i).Cells(3).Value = textbox3.Text Then
Me.DataGrid1.FirstDisplayedScrollingRowIndex = i
Me.DataGrid1.Rows(i).Selected = True
textbox4.Text = RS1.Fields(4).Value
textbox5.Text = RS1.Fields(5).Value
textbox6.Text = RS1.Fields(6).Value
textbox7.Text = RS1.Fields(7).Value
Else
textbox4.Text = "?"
textbox5.Text = "?"
textbox6.Text = "?"
textbox7.Text = "?"
End If
Exit Sub
Next