|
-
May 28th, 2011, 04:08 AM
#1
Thread Starter
New Member
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
.....................
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
-
May 28th, 2011, 08:12 AM
#2
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?
-
May 28th, 2011, 02:45 PM
#3
Thread Starter
New Member
Re: Datagridview and textboxes
Jmcilhinney, thanks for trying to solve my problem!!
The textboxes are visible all the time. I dragged them on the form using the datasource.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|