If I understood your question I suggest following solution:
Make a DataTable in which you will store your data, for example:
SubjectsTable
-----------
ID
IDtype
subject1
bool
subject2
bool
...
subjectN
bool
someOther columns as necessary
Fill it with data (subjects and whatever you need) from DB and then use it as DataSource for your dataGridView.
yourdDataGriView.DataSource = yourTable;