Hi Guys,
I have a problem loading data into datagridview control. I have 2 forms with datagridview on both forms. when the user selects a record in form 1, the related records is then displayed in the datagridview in form2. These all works fine but my problem is, when the user selects another record, from the datagridview in form1, the first record already in the datagridview in form2 is replaced by the newly selected record. How can I add another record without removing the any record from the datagridview. Sample code will be highly appreciated.
Cheers
PrivateSub dgvAvailablePhones_DoubleClick(ByVal sender AsObject, ByVal e As System.EventArgs) _
Handles dgvAvailablePhones.DoubleClick
Dim SelectedRowView As Data.DataRowView
Dim SelectedRow As PhonesDataSet.AVAILABLE_PHONESRow
SelectedRowView = CType(AVAILABLEPHONESBindingSource.Current, System.Data.DataRowView)
SelectedRow = CType(SelectedRowView.Row, PhonesDataSet.AVAILABLE_PHONESRow)
'Pass the selected row to the Phone Sales forn
'and display the form
PhoneSales.LoadOrders(SelectedRow.ITEM_ID)
PhoneSales.Show()
Me.Close()
End Sub
FriendSub LoadOrders(ByVal ItemID AsString)
AVAILABLE_PHONESTableAdapter.FillByItemID(PhoneSalesItemsDataSet.AVAILABLE_PHONES, ItemID)
End Sub