Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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?

share|improve this question
Your question is not clear. I cannot understand what you want. You should give a sample. – Toan Vo yesterday
3  
1) Please Improve your accept rate. You have asked 5 questions and accepted none of them. 2) This is a near duplicate to at least 2 of your previous questions. 3) You need to explain yourself better. No effort on your end means no effort on ours. – gunr2171 yesterday
Ok, very sorry i am newbie on this forum.. – user2323554 yesterday
I attached a screenshot that might contains clearlier explanation of my problem: imageshack.us/photo/my-images/69/50475335.png – user2323554 yesterday

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.