How to make combo box column selectable if ReadOnly property of the DataGridView set to true?

时间秒杀一切 提交于 2019-12-13 05:09:54

问题


I have DataGridView it's contains 4 columns, one of the column is DataGridViewComboBoxColumn.

In DataGridView I want to prevent user to delete, edit, add rows in data grid view, so I set the ReadOnly property of the DdataGgridView to true.

My problem is that DataGridViewComboBoxColumn is not selectable because ReadOnly property is set true.

Any idea how can I prevent user to delete, edit, add rows in DataGridView control, but make DataGridViewComboBoxColumn selectable?


回答1:


Please read the following artice.

Its about make readonly, just the cells, not the whole DataGrid



来源:https://stackoverflow.com/questions/24101266/how-to-make-combo-box-column-selectable-if-readonly-property-of-the-datagridview

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