datacolchanged代码
If e.DataCol.Name = "株号" Then
If e.DataRow.IsNull("株号") Then
e.DataRow("行株编号") = Nothing
Else
e.DataRow("行株编号") = e.DataRow("行号") & "_" & e.DataRow("株号")
End If
End If
If e.DataCol.Name = "地址编号" Then
e.DataRow("单位") = e.DataRow("地址编号").substring(7,2)
e.DataRow("建档时间") = e.DataRow("地址编号").substring(0,4)
e.DataRow("定植时间") = e.DataRow("地址编号").substring(16,4)
Else If e.DataCol.Name = "数0列" Then
DataTables("围径表").ReplaceFor("数0列",0, "当年围径 = 0")
Else If e.DataCol.Name = "数1列" Then
DataTables("围径表").ReplaceFor("数1列",1, "当年围径 = 1")
Else If e.DataCol.Name = "数2列" Then
DataTables("围径表").ReplaceFor("数2列",2, "当年围径 = 2")
End If