ListViewItem lvitem = new ListViewItem("test two");
lvitem.SubItems.Add("4");
lvitem.Group = this.listView1.Groups[0];
this.listView1.Items.Insert(index, lvitem);不管index设为多少,好像插入的记录都会出现在最后,而其index属性的确为我所设置的,为什么会没有出现在我所要插入的位置?
lvitem.SubItems.Add("4");
lvitem.Group = this.listView1.Groups[0];
this.listView1.Items.Insert(index, lvitem);不管index设为多少,好像插入的记录都会出现在最后,而其index属性的确为我所设置的,为什么会没有出现在我所要插入的位置?
不明白ING,来学习下^_^
加上下面2句话即可
this.listView1.Alignment = ListViewAlignment.Default;
this.listView1.Alignment = ListViewAlignment.Top;