datagridview单元格值已更改

时间:2014-03-03 02:39:57

标签: c#

我的datagridview遇到问题,当用户更改一个单元格的值时,列'保存'是链接单元格更改要保存的值..这是我的代码:

private void childrenDgv_CellValueChanged(object sender, DataGridViewCellEventArgs e)
    {
        childrenDgv.Rows[e.RowIndex].Cells["save"].Value = "save";
        DataGridViewLinkCell linkcell = new DataGridViewLinkCell();
        childrenDgv[ "save" , e.RowIndex] = linkcell;


    }

但问题是,当用户更改datagridview中任何单元格的值时,程序抛出此错误:是只读'save'system.data.readonlyexception:system.data.datarow.set_item中的列(data_column列,对象值)......等等。

0 个答案:

没有答案
相关问题