本文介绍了如何检查datagridview列是只读的C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用if条件只读如何检查datagridview列
谢谢与问候
rosy
How to check a datagridview column is read only using an if condition
Thanks and Regards
rosy
推荐答案
DataGridView.Columns[index].ReadOnly
嗯,最大的问题是这... keyUp事件是否覆盖了属性?假设只读列不允许对任何内容(键盘或鼠标)进行更改,确定您的列是只读的吗?
ahmm and the big question is this...the keyUp Event is overriding the property? is suppossed that a readonly column don''t allow to make changes with anything (keyboard or mouse) are you sure that your column is readonly???
if(dataGridView1.Columns[ColumnName].ReadOnly == true)
{
//do something
}
这篇关于如何检查datagridview列是只读的C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!