不要这样定义Dim d1 As String = CurrentTable.Current("一级类别") '
改成这样试试:
Dim dr As DataRow = e.DataRow
Dim dr1 As List(of DataRow) = e.DataTable.Select("一级类别 Like '" & dr("一级类别") & "'") '
Dim dr2 As List(of DataRow) = e.DataTable.Select("一级类别 Like '" & dr("一级类别") & "'And 二级类别 Like '" & dr("二级类别") & "'")
Dim dr3 As List(of DataRow) = e.DataTable.Select("一级类别 Like '" & dr("一级类别") & "'And 二级类别 Like '" & dr("二级类别") & "'And 三级类别 Like '" & dr("三级类别") & "'")
…………