Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ListView

Posted on 2009-07-09
3
Medium Priority
?
155 Views
Last Modified: 2012-05-07
How can I do something like this????

I have a Contact. In this contact there is firstname lastname and phonenumber.

I want the first name and last name to show up just like the picture
Unavngivet.bmp
0
Comment
Question by:Mickeys
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
drypz earned 2000 total points
ID: 24811963
Are you referring to listview or treeview?
0
 

Author Comment

by:Mickeys
ID: 24812139
Hmmm well I guess treeview then
0
 

Author Comment

by:Mickeys
ID: 24812422
well look at this picutre. That is what I have managed. How do I get A , B , C and so on?

And how do I add the name that starts with A under A ???
 //Supress repainting
            treeView1.BeginUpdate();
            for (int i = 0; i < 5; i++)
            {
                TreeNode n = new TreeNode("A(" + i.ToString() + ")", 0, 1);
                treeView1.Nodes.Add(n);
                for (int j = 0; j < 1; j++)
                {
                    TreeNode c = new TreeNode(" " + contactManager.Contacts[j].FirstName);
                    n.Nodes.Add(c);
                    for (int k = 0; k < 2; k++)
                    {
                        c.Nodes.Add(new TreeNode(i.ToString() + " " + j.ToString() + " " + k.ToString(), 0, 1));
                    }
                }
            }
            //resume repainting
            treeView1.EndUpdate();

Open in new window

Unavngivet.bmp
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Loops Section Overview

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question