If e.DataTable.DataRows.Count = 0 Then '如果是一个空表 Return '那么返回 End If Dim ColNames As String() = {"日期","客户","雇员"} '定义一个数组,保存复制列的名称 Dim dr As DataRow = e.DataTable.DataRows(e.DataTable.DataRows.Count - 1) '获得最后一行 For Each ColName As String in ColNames e.DataRow(ColName) = dr(ColName) '将最后一行的内容复制到新增行中. Next