人家四楼没错,简洁一点可以这样:
For i As Integer = e.Table.Cols.Count - 1 To 0 Step - 1 If e.Row.IsNull(i) = False Then e.Row("第一列") = e.Table.Cols(i).Name Exit For End IfNext