dataGridView1.Columns[0].ReadOnly = true;//设置第0列为只读
private void dataGridView1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
if (e.ColumnIndex==2) // 2代表第二列
{
e.Cancel = true;
}
}
|  | 
暂时没有评论
| 发表评论 - 不要忘了输入验证码哦! | 
| 
 | ||
| -博客论坛-|-﨣﨤﨧﨨- -网站导航-|-规范下载- -BelovedFLash欣赏- 
 | 
 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Tiancao Blog All Rights Reserved  田草博客 版权所有 Copyright © |