Solved

ListView

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

789 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