Solved

ListView

Posted on 2009-07-09
3
140 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 500 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
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…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now