I have a listview which the user can enter data through an input-form. When the user double clicks on the row of the listview the input form appears. But when the user double clicks on the same row the input-form appears twice. I am busy to prevent this.
Every input-form has a label with a date showing and it's a unique value stored in the column 1 of the listview when the user closes the input-form. I want to use that unique value to determine if an certain input-form is allready openend. By creating a list of strings. So when the user opens an input-form the date of the label will be added to the list of strings.
private List<string> opened = new List<string><();
private void bbNewNote_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
StickyNotes sticky = new StickyNotes();
sticky.gpclCaption.Text = "New Note";
sticky.lblCreation.Text = (DateTime.Now.ToString());
sticky.FormClosed += new FormClosedEventHandler(sticky_FormClosed);
So now I have to write code to determine when the user double clicks on the row of the listview if the input-form allready exists.
private void lvNotes_DoubleClick(object sender, EventArgs e)
string selectedId = this.lvNotes.SelectedItems.ToString(); <=======
if (opened.Contains(selectedId)) return;
At the line that I have marked with an arrow is the line that is not correct.
In that line i have to pass the content of lvNotes.Column to the string
What do I do wrong?
Greetings, Peter Kiers