use CellValueChanged or CellLeave event of DataGridview to check into the DB..
you can write code like..
add event to datagridview
Datagridview1.CellValueChanged += new DataGridViewCellEventHandler(Datagridview1_CellLeave);
then Write your logic in the method you mentioned in the event..
void Datagridview1_CellLeave(object sender, DataGridViewCellEventArgs e)
{
}