It means exactly what is says. Not all of your code paths return a value.
public bool checking(int x)
{
for (int j = 0; j < dataGridView1.Rows.Count; j++)
{
if (dataGridView1.Rows[j].Cells[0].Value.ToString == x.ToString())
{
exist = true;
return true;
}
else
{
exist = false;
return false;
}
}
return false;
}