Hi,
When binding to a data source that contains multiple lists or tables, you must set the DataMember property to a string that specifies the list or table to bind to. So if you want the DataGridView to show the data, you need to set the dataGridView1.DataMember to “STUDENT�or “MARK�
Base on my understanding, you want to show master-details in one DataGridView. The DataGridView does not support for showing master-details data in the same DataGridView. You can try previously shipped window forms datagrid control.
More information:
DataGridView.DataSource Property
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.datasource.aspx
Creating Master-Details Lists with the Windows Forms DataGrid Control
http://msdn.microsoft.com/en-us/library/aa984328(VS.71).aspx
How to: Create a Master/Detail Form Using Two Windows Forms DataGridView Controls
http://msdn.microsoft.com/en-us/library/c12c1kx4.aspx
FAQ 31. How do I show master-details?
FAQ 32. 32. How do I show master-details in the same DataGridView?
If I misunderstood you, or you have further questions, please feel free to tell me.
Best regards,
Ling Wang
Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.