0
所以我写了一个重新排列列表视图的列表(实际上只是 - = 1和+ = 1是所选列表视图列的显示索引,但是当我移动列时,子项仍然存在,它们不会移动。想对应的子项与列移动。如何重新排列listviewitem的子项目?
main.listView1.Columns[listBox1.SelectedIndex].DisplayIndex += 1;
listBox1.Select();
listBox1_SelectedIndexChanged(sender, e); //the code for moving the column to the right
main.listView1.Columns[listBox1.SelectedIndex].DisplayIndex -= 1;
listBox1.Select();
listBox1_SelectedIndexChanged(sender, e); //the code for moving the column to the left
决不再用头脑,我只是意识到愚蠢的列表视图具有拖放列表视图重新排序功能。抱歉。 –