How to avoid Dupli Data Entry through Grid View To List box
How to avoid Duplicate data entry through DataGridView To ListBox when Button Click
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
ali tuncerPosted May 3, 2016, 12:28 AM
Before you add item to listbox, you can check if item exists..
{
if (!listBox1.Items.Contains(row.Cells["col1"].Value))//check if it exist
{
listBox1.Items.Add(row.Cells["col1"].Value); //add item
}
}