代码没问题的,报错还是怎样?
Case "样板类别" msgbox(123) Dim pr As DataRow = e.DataRow.GetParentRow("Dd") If pr IsNot Nothing Then pr("类别") = e.DataRow("样板类别") End If