title: Listview items (and subitems)
body: <p>Hope you guys can help me out once more before I go nuts.
  Iv'e been searching ligh and low, here and on google.
  Gone through MSDN back and forth, but to no avail... I just don't understand what I'm doing wrong...</p>
  
  <p>I have a form, where I have added a listview (without any changes to the default settings when it's beeing dragged to the form).</p>
  
  <p>After a day of fooling around, I got to simply trying an easy example since nothing I wanted to do would work. The example got to serve as some kind of "If this doesn't work, then it's time to ask for help!"...</p>
  
  <p>This is the example;</p>
  
  <pre><code>ListViewItem item = new ListViewItem();
  item.Text = "FirstItem";
  item.SubItems.Add("A subitem");
  item.SubItems.Add("A second subitem");
  item.SubItems.Add("A third subitem");
  listView1.Items.Add(item);
  </code></pre>
  
  <p>All that this example gives me, it "FirstItem", nothing else...</p>
  
  <p>My own version that I wanted to try, is the following:</p>
  
  <p>I have a dictionary named "members". it contains two two strings, "name" as Key, and "LastSeen" ad Value.</p>
  
  <p>I'm trying the following:</p>
  
  <pre><code>if (GroupMembers.Count &gt; 0)
  {
      listView1.Items.Clear();
      key2name getname = new key2name();
      ListViewItem lvi = new ListViewItem("Name");
      ListViewItem lvi2 = new ListViewItem("Last seen");
      listView1.Columns.Add("Name", -2, HorizontalAlignment.Left);
      listView1.Columns.Add("LastSeen", -2, HorizontalAlignment.Left);
      foreach (KeyValuePair&lt;string, string&gt; member in GroupMembers)
      {
          lvi.SubItems.Add(member.Key);
          lvi2.SubItems.Add(member.Value);
      }
      listView1.Items.AddRange(new ListViewItem[] { lvi, lvi2 });
  }
  </code></pre>
  
  <p>What I am trying to acomplish, is that my listview will show two columns, with the first column name with the text "Name", and the second "Last seen".
  Under each of those columns, I want the content of my dictionary to show up.</p>
  
  <p>Can someone please help me shed some light over this before I go completely nuts over this?
  Thanks...</p>
  
  <p>Although the answers were right, I still don't get the utput I want, and I'm not sure of how to do it..</p>
  
  <p>Now I do see the columns,
  but I get this:</p>
  
  <pre><code>|  Name    | LastSeen   |
  |Last seen | 2011-09-06 |
  |Name      | Full Name  |
  </code></pre>
  
  <p>What I want is:</p>
  
  <pre><code>|  Name    | LastSeen   |
  |FullName  | 2011-09-06 |
  |FullName  | 2011-09-06 |
  |FullName  | 2011-09-06 |
  </code></pre>
  
  <p>The dictionary curently contains 3 KeyValuePairs</p>