Link to home
Start Free TrialLog in
Avatar of Mickeys
MickeysFlag for Sweden

asked on

ListView with combobox

I have managed to create everything but I am still missing how to add a combobox to my listview
Please show me how to do this.

I have been to alot of webpages and I cant seem to get it running. So I dont need links to webpages. I do need someone to show how to do it.

My combobox name is teleComboBox
in my Contact class is all the phones I want to add int this: private List<Phone> m_phone;
listView1.Clear();
 
            // Used for creating listview items.
            ListViewItem listviewitem;
 
            //ListViewItem subItem = new ListViewItem();
            listView1.Columns.Add("FirstName");
            listView1.Columns.Add("LastName");
            listView1.Columns.Add("E-mail");
            listView1.Columns.Add("Phonenumbers");
 
            // Ensure that the view is set to show details.
            listView1.View = View.Details;
            listView1.FullRowSelect = true;
 
            // Create some listview items consisting of first and last names.
            foreach (Contact contact in contactManager.Contacts)
            {
                listviewitem = new ListViewItem(contact.FirstName);
                listviewitem.SubItems.Add(contact.LastName);
                listviewitem.SubItems.Add(contact.MyEmail.Personal);
 
                //listviewitem.SubItems.Add(contact.Telephone.ToString());
 
                this.listView1.Items.Add(listviewitem);
 
 
            }

Open in new window

Avatar of drypz
drypz
Flag of Philippines image

hi! you may refer to this link

http://support.microsoft.com/kb/320344
Avatar of Mickeys

ASKER

been there. Didnt get it to work. So please...no more links. Just show me how to do it.
Avatar of Gautham Janardhan
Gautham Janardhan

are u using WPF ?
Avatar of Mickeys

ASKER

I have no idea. I have created a windows form....am I using it then? (VS2008)
just follow the link http://support.microsoft.com/kb/320344 and post your problem here
It is a good tutorial.
ASKER CERTIFIED SOLUTION
Avatar of Gautham Janardhan
Gautham Janardhan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial