G
Guest
Hi
I have created a dataset that selects all information from a 'Client' database table
I then created a dataview from this so that i can filter the data according to the clients surname.
This dataview is the datasource for my datagrid
I have the following code to highlight the entire row when any cell of the datagrid is clicked..
Private Sub DGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DGrid1.MouseU
'code to select whole line from the datagrid when any cell is clicke
Dim pt = New Point(e.X, e.Y
Dim hti As DataGrid.HitTestInfo = DGrid1.HitTest(pt
If hti.Type = DataGrid.HitTestType.Cell The
DGrid1.CurrentCell = New DataGridCell(hti.Row, hti.Column
DGrid1.Select(hti.Row
End I
End Su
What i wanted to do is when the user highlights a row in the way shown above by clicking on any cell, i need to retrieve the value that is stored in the first column of that specific row. I then want this value to be put into a variable so that i can use it elsewhere
Is this possible?? Can someone plz tell me how i can access this value?
I am using VS.NET 2002 and am creating a windows app using VB.NE
Can anyone plz help me to try and solve this problem
I have created a dataset that selects all information from a 'Client' database table
I then created a dataview from this so that i can filter the data according to the clients surname.
This dataview is the datasource for my datagrid
I have the following code to highlight the entire row when any cell of the datagrid is clicked..
Private Sub DGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DGrid1.MouseU
'code to select whole line from the datagrid when any cell is clicke
Dim pt = New Point(e.X, e.Y
Dim hti As DataGrid.HitTestInfo = DGrid1.HitTest(pt
If hti.Type = DataGrid.HitTestType.Cell The
DGrid1.CurrentCell = New DataGridCell(hti.Row, hti.Column
DGrid1.Select(hti.Row
End I
End Su
What i wanted to do is when the user highlights a row in the way shown above by clicking on any cell, i need to retrieve the value that is stored in the first column of that specific row. I then want this value to be put into a variable so that i can use it elsewhere
Is this possible?? Can someone plz tell me how i can access this value?
I am using VS.NET 2002 and am creating a windows app using VB.NE
Can anyone plz help me to try and solve this problem