How do I add SubItems to a ListView control

Platform: WinForms| Category: ListView

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;

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.