我可以在向数据表中添加列时添加表达式,但现在我需要添加更新数据表中现有数据列的表达式。
我该怎么做 ?
foreach (DataColumn col in this.dv.ToTable().Columns)
{
if (col.ColumnName == "tot")
{
col.Expression = string.Empty;
col.Expression = "description";
}
}
这段代码似乎不起作用..我该如何做到这一点?