A have problem with add element to my listView. I have Form1 with:
private void button1_Click(object sender, EventArgs e)
{
DodajWindow Dodaj = new DodajWindow();
Dodaj.Show();
ListViewItem lvi = new ListViewItem(DodajWindow.s);
listView1.Items.Add(lvi);
}
And Form2 with:
public static string s;
public void button1_Click(object sender, EventArgs e)
{
s = textBox1.Text;
this.Close();
}
Ok, this code isn't work good, becouse added to my listView:
1 line: " "
2 line: "word"
Why added empty line?