问题描述
我有DataGridView,它包含4列,其中一列是DataGridViewComboBoxColumn。
I have DataGridView it's contains 4 columns, one of the column is DataGridViewComboBoxColumn.
在DataGridView中,我要防止用户删除,编辑,添加数据网格中的行视图,
,所以我将DdataGgridView的ReadOnly属性设置为true。
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.
我的问题是,由于ReadOnly属性设置为true,所以无法选择DataGridViewComboBoxColumn。
My problem is that DataGridViewComboBoxColumn is not selectable because ReadOnly property is set true.
任何想法如何阻止用户删除,编辑,添加DataGridView控件中的行,但使DataGridViewComboBoxColumn可选?
Any idea how can I prevent user to delete, edit, add rows in DataGridView control, but make DataGridViewComboBoxColumn selectable?
推荐答案
请阅读以下。
它是关于只读的,只是单元格,而不是整个DataGrid
Its about make readonly, just the cells, not the whole DataGrid
这篇关于如果DataGridView的ReadOnly属性设置为true,如何使组合框列为可选?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!