How to hide a column in a ListView control?

后端 未结 9 2367
慢半拍i
慢半拍i 2021-02-14 03:01

How can I hide a column in a ListView control, without setting the column Width property to 0?

Also, can I lock the Width

9条回答
  •  面向向阳花
    2021-02-14 03:33

    Simply just remove column at the index you wish:

    listView1.Columns.RemoveAt(3);
    

    when you want it back just insert it with its name:

    listView1.Columns.Insert(3, "Column Name");
    

    It will back with its values.

提交回复
热议问题