I tried convert to string value of cell in a datagridview:
string t = row.Cells[0].Value.ToString()== null ? String.Empty : row.Cells[0].Value.ToString();
MessageBox.Show(t);
MessageBox shows correctly value but application gives exception:
Object reference not set to an instance of an object.