如何更改DataGridView
Windows窗体中所有单元格的值?我想直接在Windows窗体改变,就像直接在单元格直接在DataGridView中更改值
打字我有这样一个表:
AA BB CC
--------------
1 aa ac
2 bb fd// I type here and change the value to kk
代码:
DataGridViewTextBoxColumn AA= new DataGridViewTextBoxColumn();
MsgIDHex.HeaderText = "AA";
MsgIDHex.DataPropertyName = "AA";
DataGridViewTextBoxColumn BB= new DataGridViewTextBoxColumn();
MsgIDHex.HeaderText = "BB";
MsgIDHex.DataPropertyName = "BB";
DataGridViewTextBoxColumn CC= new DataGridViewTextBoxColumn();
MsgIDHex.HeaderText = "CC";
MsgIDHex.DataPropertyName = "CC;
dataGridView1.DataSource = result;
dataGridView1.Columns.AddRange(AA, BB, CC};
我应该做DataGridViewTextBoxEditingControl
什么?
目前尚不清楚你想要做什么,或者什么不能工作。你想能够输入网格中的单元格吗?这应该只是工作。当你尝试时会发生什么? –
对不起,我没有太清楚地解释它。感谢Vyktor我知道,编辑单元格我应该写dataGridView1.BeginEdit(true);感谢所有人 –