设置主键列: this.tableTestData.PrimaryKey = new DataColumn[] { this.tableTestData.Columns[0] }; 转载于:https://www.cnblogs.com/pnljs/p/3610597.html