Hi All,
I have a bounded listbox. I can add items to it with:
currentOptionsTableTableAdapter1.Insert(textBoxAdd.Text);
currentOptionsTableTableAdapter1.Update(this.optionData_DS.currentOptionsTable);
after I add strings to it I need to check that I'm not adding something that is already in it. I was using this without success:
if (currentOptionsTableListBox.Items.Contains(textBoxAdd.Text))
{
MessageBox.Show("Symbol already exist", "Can not add");
return;
}
It seems to work for an unbounded listbox. How do I do this for a bounded listbox?
Thanks