dtParent.Constraints.Add(new UniqueConstraint("MyConstraint", new DataColumn[] { MyDataTable.Columns["Key1"], MyDataTable.Columns["Key2"]}, false));