?
Solved

Text item is adding to the incorrect column on a listview control

Posted on 2006-07-13
2
Medium Priority
?
236 Views
Last Modified: 2010-04-16
I want to add Dexcription to the 2nd column "Description" but instead it's added to the 1st column, "Name".  How do I correct this?  

      private void CreateUnityListView()
        {
            NodeDetail.Columns.Clear();
            NodeDetail.Items.Clear();
            NodeDetail.View = View.Details;
            //Create the columns for the listview for the Unity

            NodeDetail.Columns.Add("Name", "Name", 200, HorizontalAlignment.Left, 0);
            NodeDetail.Columns.Add("Description", "Description", 280, HorizontalAlignment.Left, 0);
            NodeDetail.Items.Add("Description", "Folder for context mappings", 7);
        }
0
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17105131
What are you dealing with here?  Not enough information?  What is NodeDetail?  Are you working with a ListView?  If you are then you need to add subitems to the item.

Bob
0
 
LVL 5

Accepted Solution

by:
nickhoggard earned 1000 total points
ID: 17106145
Hi

Try

            NodeDetail.Items.Add(new ListViewItem(new string[] { "Description", "Folder for context mappings" }));

Cheers

Nick
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 9 hours left to enroll

777 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