我想用只读行填充数据网格视图。这没有用:
RunTimeCreatedDataGridView.Rows[i].ReadOnly = true;
这是我的代码:
private void setUpListTableForGridView(int rows)
{
for (int i = 1; i <= Constans.AMOUNT_COLUMNS_IN_LIST; i++)
{
DataGridViewTextBoxColumn dgc = new DataGridViewTextBoxColumn();
RunTimeCreatedDataGridView.Columns.Add(dgc);
}
for (int i = 1; i < rows; i++)
{
RunTimeCreatedDataGridView.Rows.Add();
}
}
答案 0 :(得分:0)
从表单设计器中,您可以禁用编辑: