Solved

ListView

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

785 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