How to have Checkbox as ColumnHeader of dataGridView

前端 未结 6 2015
鱼传尺愫
鱼传尺愫 2020-12-24 04:00

I\'m developing a window application in C# VS2005. I have a dataGridView in which the first column has Checkboxes. Now i want the Column header also to be a CheckBox which i

6条回答
  •  被撕碎了的回忆
    2020-12-24 04:09

    If you choose @Ehsan solution you must know that if the checkbox cell is selected it won't update the checkbox UI. You need to call RefreshEdit() afterwards.

    It only happens when the control is child-control of the datagridview. For some reason when it is a child-control the selected cell checkboxes are not able to refresh the UI by their own.

提交回复
热议问题