If e.DataCol.Name = "第一列" Then If e.newValue.Length > 3 Then Dim str As String = GetPy(e.NewValue.SubString(3),True) If str.Length > 6 Then str = str.SubString(0,6) e.DataRow("第二列") = str.ToUpper Else e.DataRow("第二列") = Nothing End If Else e.DataRow("第二列") = Nothing End If