shah

shah

  • NA
  • 42
  • 0

How to check for duplication in listview?

May 3 2007 10:15 AM
I have the code which i used to check duplication in listbox but not working?

Q. I have 3 columns in listview grid and i want to check duplication with only one field. How to do that?

if(listView1.Items.Contains(lvi) == false)
{
//Add the item to the ListView Control
listView1.Items.Add(lvi);
}
else
{
//Warn user of duplicate entry...
MessageBox.Show("Duplicate Item!");
}

Answers (2)