Hi friends
I want to know how to insert data in listview.
Thank you.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
EhteshamPosted May 14, 2012, 7:55 AM
Consider the below example for tile view with item image
public partial class Form1 : Form
{
ImageList ImgLst = null;
public Form1()
{
InitializeComponent();
listview1.View = View.Tile;
ImgLst = new ImageList();
//Adding image from resource to ImageList
ImgLst.Images.Add(Properties.Resources.img);
listView1.LargeImageList = ImgLst;
ListViewItem Lstitem = new ListViewItem("Item name1", 0);
listView1.Items.Add(Lstitem);
Lstitem = new ListViewItem("Item name2", 0);
listView1.Items.Add(Lstitem);
}
}
Kunal VaishyaPosted May 14, 2012, 7:23 AM
In Window application
And a more verbose way is here: