0
Answer

about listView_SelectedIndexChanged...

Ask a question
yusuf

yusuf

16y
1.9k
1

Hello...

I have  Customer and Phones classes. I keep customers and theirs phones. When i select a customer in listBox, in listBox2 i can see that customers phones. But i need to do it in listView. i need to select a customer in listView and listBox2 must show the phones of it. For this i know that listviewItem is needed but couldnt do ..

Customer m = listView1.SelectedItems[0].Tag as Customer;

for (int i = 0; i < m.Phones.Count; i++)

{

listbox2.Items.Add(m.Phones[i]);

 

}

 

 

thanks...!