u can modify the code like and make a separate call for select and bind.
var g = dataGridView1.Rows;
foreach (GridViewRow item in g)
{
if (item.Cells[0].Text.Equals(comboBox1.Text))
{
MessageBox.Show("entered value already exist in table");
return;
}
}
callselectquery(comboBox1.Text);