You can't cast a DBNull value to any type: that's what DBNull is saying - it's a special value which says "the database contains no value in this column".
Trying to cast it to an integer is like trying to make this sum work:
x = y +
Y plus what? You don't know, I don't know, and for sure your database doesn't know either! :laugh:
Instead, try this:
object o = MyGrid.Rows[2].Cells[8].Value;
Index = o == DBNull.Value ? 0 : (int) o;
Or replace zero with another default value.