need help selecting rows in a DataGridView
-
I want the DataGridView to select for methe row that contains 1234 in CustomerID column. thanks ;P
Shimi
-
I want the DataGridView to select for methe row that contains 1234 in CustomerID column. thanks ;P
Shimi
Can you be more specific. what is methe?
Shay Noy
-
Can you be more specific. what is methe?
Shay Noy
me+the I have two tables: Quotes and customers both tables contain a CustomerID column which the parent is of course the Customers table. now every quote belongs to only one customer. I create a binded detail-view form that is binded to the QuotesBindingSource. I added to my form a new DataGridView that shows the Customers table content. I want in every QuotesBindingSource.CurrentChanged (or something like) the CustomersDataGridView to select the appropriate customer's row according to the related CustomerID. if I'm not understandable enough please tell me and I will try to explain any more thank you! :laugh::laugh::laugh:
Shimi
-
me+the I have two tables: Quotes and customers both tables contain a CustomerID column which the parent is of course the Customers table. now every quote belongs to only one customer. I create a binded detail-view form that is binded to the QuotesBindingSource. I added to my form a new DataGridView that shows the Customers table content. I want in every QuotesBindingSource.CurrentChanged (or something like) the CustomersDataGridView to select the appropriate customer's row according to the related CustomerID. if I'm not understandable enough please tell me and I will try to explain any more thank you! :laugh::laugh::laugh:
Shimi
this worked:
Private Sub ctlSpan_TextChanged(ByVal sender As Control, ByVal e As System.EventArgs) Handles ctlSpan.TextChanged With CustomersDataGridView If .Columns.Contains("CustomerID") Then For Each row As DataGridViewRow In .Rows If row.Cells("CustomerID").Value.ToString = sender.Text Then If row.Cells("CustomerID").Value IsNot Nothing Then If Not row.Selected Then row.Selected = True End If End If Next End If End With End Sub
Shimi
modified on Sunday, December 30, 2007 11:39:28 PM