Skip to main content
edited tags
Link
Samich
  • 30.4k
  • 6
  • 70
  • 80
Source Link
Bali C
  • 31.4k
  • 37
  • 128
  • 155

C# ListView Sub Items

I am trying to add items to a listView that has 2 columns. When I use the code below it will add an item to the first column and nothing to the second then it will create a new line with nothing in the first one and an item in the second, how do I get them both on the same line? Thanks.

listView1.Items.Add(item1); ListViewItem date = new ListViewItem(); date.SubItems.Add(subitem1); listView1.Items.Add(date);