2
Answers

About SDI Forms

Ask a question
yusuf

yusuf

16y
2.6k
1

Hi...

I have 2 Forms. I add Leauges to comboBox, and add the teams to the leauge which is selected in cmbBox in Form1 also add the properties of team...Form2 has a listview. My problem is when i push a button in Form1, Listview must show the properties which i added in Form1.

i changed the Modifier prop. of combobox1 and also added it to Form2.

it works if i do this in the same Form.

in form 1 :

Form_UrunListesi f = null;

private void btn_Listele1_Click(object sender, EventArgs e)

{

if (f==null)

{

f = new Form_UrunListesi();

f.ShowDialog();

}

}

in form2

//this code adds the properties of teams to the listview.

foreach (ürünlerim ürr in ((ÜrünTipi)comboBox1.SelectedItem).Ürünlerim)

{

ListViewItem lvi = new ListViewItem(new string[]

{ürr.ÜrünlerimMarkaAdi,ürr.ÜrünModeli,ürr.UrunlerimOzellikleri,

ürr.ÜrünAlisFiyati,ürr.ÜrünSatisFiyati,

Convert.ToString(ürr.StokMiktari)});

listView1.Items.Add(lvi);

 

thanks...


Answers (2)