Friday, March 25, 2011

How to use List View Control in C#.Net

A ListView control allows you to display a list of items with an optional icon in a similar manner to Windows Explorer. The most often used manner is to show a multicolumn list of items as displayed here.
How to change listview control view:
You need to just use the view  property or listview control eg:
How to add item in Listview control
You can use the listviewitem object for adding one row in a Listview eg:

 ListViewItem lwi=new ListViewItem();
            lwi.Text = "Ajit";
            lwi.SubItems.Add("20000$");
            lwi.SubItems.Add("20-4-2011");
            listView1.Items.Add(lwi);

How to clear or remove all items from the listview control
listView1.Items.Clear();
 


  

2 comments:

  1. Thanks for sharing your view.....

    We are specialists in doll and teddy bear repair. Whether your doll is ceramic or porcelain we have the facilities and trained staff on hand for a high quality repair.

    Doll Hospital

    ReplyDelete