It's not clear what your question is but the DataTable.PrimaryKey property will throw a System.Data.DataException if you attempt to set it to a foreign key. See:

http://msdn.microsoft.com/en-us/library/system.data.datatable.primarykey.aspx