برای این کار از دستور زیر استفاده میکنیم:



if(this.dataGridView1.SelectedRows[0].Cells[8].Value

!=System.DBNull.Value)