是不是更新指定单元格的值?是的话,就这样可以的:
int nOldValue = 0;
object objValue = this.dataGridView1.Rows[指定行].Cell[指定单元格].Value;
if(objValue != null)
{
nOldValue = int.TryParse(objValue.ToString());
}
int nNewValue = 对nOldValue经过一番计算之后的值;
this.dataGridView1.Rows[指定行].Cell[指定单元格].Value = nNewValue;
int nOldValue = 0;
object objValue = this.dataGridView1.Rows[指定行].Cell[指定单元格].Value;
if(objValue != null)
{
nOldValue = int.TryParse(objValue.ToString());
}
int nNewValue = 对nOldValue经过一番计算之后的值;
this.dataGridView1.Rows[指定行].Cell[指定单元格].Value = nNewValue;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货