Datagridview and textboxes
Hi there
I am building an application where on a form is a datagridview and textboxes. The dgv and tb are bound to the same table. I am using the dgv to have an overview of the records and the tb I use for editing. Selecting a record programmatically in the dgv is no problem, but the textboxes have to be filled with the same record. Here I have added my code to this far.
If OuderID <> 0 Then
'select the row
For i As Integer = 0 To dgvOuders.RowCount - 1
If dgvOuders.Rows(i).Cells(0).Value = OuderID Then
'record found
dgvOuders.Rows(i).Selected = True
'now display the record in textboxes
.....................:wave:
End If
Next
End If
I am stuck right now. I want to add (on the dotted line) an performclick action, but a dgv doesn't have a performclick action. Can somebody help me??
Thanks a lot!!
Arneault
Re: Datagridview and textboxes
Are the grid and TextBoxes both displayed all the time, or are you opening a dialogue containing the TextBoxes only when you want to edit a record?
Re: Datagridview and textboxes
Jmcilhinney, thanks for trying to solve my problem!!:thumb:
The textboxes are visible all the time. I dragged them on the form using the datasource.