yusuf

yusuf

  • NA
  • 57
  • 0

about listView_SelectedIndexChanged...

Dec 22 2007 6:37 AM

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...!