Haryana
unread,Dec 12, 2007, 7:41:23 AM12/12/07Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ASPNETCodeSnippets
Private Sub MSHFlexGridRC_CellClick(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles
MSHFlexGridRC.CellClick
Dim cm As CurrencyManager =
CType(Me.BindingContext(MSHFlexGridRC.DataSource,
MSHFlexGridRC.DataMember), CurrencyManager)
' Retrieve the default DataView of the DataGrid
Dim dv As DataView = CType(cm.List, DataView)
' Use Currency Manager and DataView to retrieve the Current
Row
Dim dr As DataRow
dr = dv.Item(cm.Position).Row
Me.txtTMRID.Text = dr(0).ToString
Me.txtReason_Code.Text = dr(2).ToString
Me.txtBrief_Desc.Text = dr(3).ToString
Me.txtCode_Desc.Text = dr(4).ToString
If Trim(dr(1).ToString) = "" Then
Me.cboTransType.Text = "A"
Else
Me.cboTransType.Text = Trim(dr(1).ToString)
End If
End Sub