The error is because your cast isn't working:
(dataGridView1.Columns[4] as DataGridViewComboBoxColumn).DataSource
http://msdn.microsoft.com/en-us/library/cscsdfbt%28v=vs.71%29.aspx[
^]
If this type of cast doesn't work, it simply returns null, so you're trying to set the
.DataSource
property on an object that is null.
I can't say why the cast isn't working but you need to check that
dataGridView1.Columns[4]
is not null and that
dataGridView1.Columns[4]
is of type
DataGridViewComboBoxColumn
before you cast.