Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
323 views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Please read the following artice.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...