-
Datagridviews
Hi,
I have a datagridview (DgvProductDet) it has 5 columns (data bounded)
TruckModel
ProductName
Quantity
Priceperitem
Buy Now (Button Click)
I have another dagaridview (DgvSelectedItems) it has 4 columns (data unbounded)
TruckModel
ProductName
Quantity
Priceperitem
What I want to achieve is that when the Buy Now (Button Click) which is at the end of each row is clicked, the details of that row are populated on the other datagridview (DgvSelectedItems)..
How can I achieve this please?
Thanks
-
Re: Datagridviews
Hi,
this is my first post here, so check this twice:rolleyes:
Code:
Private Sub DgvProductDet_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DgvProductDet.CellClick
If e.ColumnIndex = 4 Then
Dim param(3) As Object
For i As Integer = 0 To 3
param(i) = DgvProductDet.Rows(e.RowIndex).Cells(i).Value
Next
DgvSelectedItems.Rows.Add(param)
End If
End Sub
I hope this is what you want.
Regards
benek