Exactly : )
cool thanks Xav for that,
sorry to ask one last question what if you had multiple textboxes, would your declare each textbox giving it its own variable then putting all variables together in one dictionary collection? if that is the case would the listview.items.add("put dictionary name here"?) would that be right?
ListView.Items.Add() expects a string value. If you wish to add more than one column to the list view (in Details view) then you can manipulate SubItems:
Code:Button1_Click(EventArgs e, object sender) { Form2 frm = new Form2(); if (frm.ShowDialog() != DialogResult.OK) return; ListViewItem row = listView1.Items.Add(frm.textBox1.Text); row.SubItems.Add(frm.textBox2.Text); row.SubItems.Add(frm.textBox3.Text); //etc. }
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks