Disable GridViewColumn Resize

烂漫一生 提交于 2019-12-04 03:01:56

See this link: Fixed-Width Column in ListView: A Column that cannot be resized

A fixed-width column is a column that cannot be resized by mouse dragging or double-clicks. You can find instances in outlook. Currently two methods can be used to achieve the effect. One is to restyle GridViewColumnHeader to remove the gripper inside its Template. The other is to subclass GridViewColumn to restrict columns' width to a fixed size.

Could you explain me in detail and please give me your code.

If you want to disable the column of a GridView , you can use

GridView1.Columns[0].Visible = false;

then column 0 of the grid become disable and the other column of the grid resize automatically.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!