Select Case e.DataCol.Name
Case "编号"
If e.DataRow.Isnull("编号") Then
e.DataRow("乡镇名称") = Nothing
e.DataRow("村名称") = Nothing
Else If e.DataRow.IsNull("编号") = False AndAlso e.DataRow("编号").length >=6 Then
Dim bm As String = e.DataRow("编号").Substring(0,4)
Dim dr As String = DataTables("所在地").Find("镇村编码 = '" & bm & "'")
If dr IsNot Nothing Then
e.DataRow("乡镇名称") = dr("乡镇名称")
e.DataRow("村名称") = dr("村名称")
End If
End If
End Select
错误提示:编译错误:类型“DataRow”的值无法转为“String”
错误代码:Dim dr As String = DataTables("所在地").Find("镇村编码 = '" & bm & "'")