how to find record in datagrid
-
hi, A DATABASE IS RETRIEVED IN A DATAGRID then i want to use "find box" to find the record exactly the same as MS ACCESS USES. bye.
-
hi, A DATABASE IS RETRIEVED IN A DATAGRID then i want to use "find box" to find the record exactly the same as MS ACCESS USES. bye.
I haven't worked with MS Access in a while, so I'm not sure how they do it. The easiest way to do this is to cycle through the rows until you find what you need. Dim row As DataGridViewRow For Each row In DataGridView1.Rows If row.Cells(0).Value.ToString = TextBox1.Text Then DataGridView1.CurrentCell = row.Cells(0) Exit For End If Next The 0 in the cells parameters should match whatever column you want it in. HTH
-
I haven't worked with MS Access in a while, so I'm not sure how they do it. The easiest way to do this is to cycle through the rows until you find what you need. Dim row As DataGridViewRow For Each row In DataGridView1.Rows If row.Cells(0).Value.ToString = TextBox1.Text Then DataGridView1.CurrentCell = row.Cells(0) Exit For End If Next The 0 in the cells parameters should match whatever column you want it in. HTH
Thanks leeland but datagridviewrow is not defined , so it is showing systex error. what is datagridviewrow here.please explain.
-
Thanks leeland but datagridviewrow is not defined , so it is showing systex error. what is datagridviewrow here.please explain.