Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

How do I add subitems to a ListView control?

Try code such as:

ListViewItem item = new ListViewItem("NewItem");
item.SubItems.AddRange( new string[] { "SubItem1", "SubItem2" ) };
listView1.Items.Add( item );
listView1.Items.Add(
  new ListViewItem( new string[] { "item1", "item2", "item3", "item4" } );
listView1.View = View.Details;

Contributed from George Shepherd's Windows Forms FAQ



Page view counter