Private
Sub
CustomerDataGridView_RowHeaderMouseDoubleClick(ByVal
sender As
Object,
ByVal e
As
System.Windows.Forms.DataGridViewCellMouseEventArgs)
Handles
CustomerDataGridView.RowHeaderMouseDoubleClick
' Declare a variable named
chosenCustomerRow of type CustomerRow.omerRow
Dim chosenCustomerRow
As AjaxDataSet.CustomerRow
' Retrieve the CustomerRow object
from the DataGridView row;
' assign it to the chosenCustomerRow
variable.
chosenCustomerRow =
CType(CType(Me.CustomerBindingSource.Current,
DataRowView).Row, AjaxDataSet.CustomerRow)
' Use data from the double-clicked
row.
Dim customerInfo
As
String = ""
Dim nl
As
String = Environment.NewLine
customerInfo &=
"Data retrieved from the row you
double-clicked:" & nl & nl
customerInfo &=
chosenCustomerRow.Name & nl
customerInfo &=
chosenCustomerRow.StreetAddress1 & nl
customerInfo &=
chosenCustomerRow.City.Trim & ", "
& chosenCustomerRow.State.Trim & "
" & chosenCustomerRow.Zip.Trim & nl
customerInfo &=
"Last Order Date: " &
chosenCustomerRow.LastOrderDate
Me.RichTextBox1.Text =
customerInfo
End
Sub