C#: How to add subitems in ListView

后端 未结 10 1263
眼角桃花
眼角桃花 2020-11-29 07:33

Creating an item(Under the key) is easy,but how to add subitems(Value)?

listView1.Columns.Add(\"Key\");
listView1.Columns.Add(\"Value\");
listView1.Items.Add         


        
10条回答
  •  旧时难觅i
    2020-11-29 07:55

    Great !! It has helped me a lot. I used to do the same using VB6 but now it is completely different. we should add this

    listView1.View = System.Windows.Forms.View.Details;
    listView1.GridLines = true; 
    listView1.FullRowSelect = true;
    

提交回复
热议问题