参考,自己变通以下
e.DataRow("编号") = e.DataTable.Compute("Max(编号)") + 1
http://www.foxtable.com/help/topics/0630.htm