将其他列设置为只读 [英] set other columns to readonly
本文介绍了将其他列设置为只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将vbflexgrid的其他列设置为只读,而其他列可以使用文本框和组合框进行编辑?
How to set other columns of vbflexgrid to read-only while other columns could be edited using textbox and combobox?
推荐答案
您必须将其设置为只读单元格细胞.这是链接 [
You have to make it readonly cell by cell. here is link[^]
for (int i = 0; i < dataGridView1.ColumnCount; i++)
{
if (i == 0)
{
//set to ReadOnly
dataGridView1.Columns[i].ReadOnly = true;
}
else
{
dataGridView1.Columns[i].ReadOnly = false;
}
}
为此列设置ReadOnly ="True"
set ReadOnly="True" for that column
这篇关于将其他列设置为只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文