Monday, September 10, 2018

C# - How add items to ListView

listView1.View = View.List;
            
ListViewItem lvi = new ListViewItem( "Item 1" );
listView1.Items.Add( lvi );

lvi = new ListViewItem( "Item 2" );
listView1.Items.Add( lvi );

lvi = new ListViewItem( "Item 3" );
listView1.Items.Add( lvi );    
Output:

No comments:

Post a Comment