Foreign Keys Duplicated in DataGridView

Posted by John Doe on Stack Overflow See other posts from Stack Overflow or by John Doe
Published on 2013-07-02T17:02:29Z Indexed on 2013/07/02 17:05 UTC
Read the original article Hit count: 162

I created a Windows Forms Application to which I added a DataGridView and LINQ to SQL Classes from one of my databases. I can successfully bind one of my database's tables to my DataGridView:

var dataSource = from c in _db.NetworkedEquipments
                 select c;
dataGridView1.DataSource = dataSource;

However, the foreign keys get duplicated, that is, the columns appear twice. How can I prevent this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about linq-to-sql