Hi guys about my previous post on Copy Selected rows from Datagrid to another that was answered by oussama_1 and Deep Modi, I was wodering if is it possible to detect that there is a similar row between the 2 Datarids to avoid redundancy? Does it require a datatable or dataset?
jared.geli
9
Junior Poster
Recommended Answers
Jump to PostFor indx = 0 To DataGridView2.Rows.Count - 1 If DataGridView1.CurrentRow.Cells("ID").Value = DataGridView2.Rows(indx).Cells(1).Value Then Dim ask = MessageBox.Show("Record Already Exist, Replace existing record ?", "Records", _ MessageBoxButtons.YesNoCancel) If ask = DialogResult.Yes Then ''copy code End If Else ''copy code End If Next
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.