Select Case e.DataCol.name Case "银行卡号","银行账号" If e.DataRow("银行卡号").length > 6 Then Dim s As String =e.DataRow("银行卡号").Substring(1,6) Dim dr As DataRow dr = DataTables("银行卡代码").Find("[银行卡代码] = '" & s & "'") If dr IsNot Nothing Then e.DataRow("归属银行") = dr("归属银行") End If End If End Select