try
DataTable dt = new DataTable();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
if (dt.Rows.Count == 0) {
DataTable dtNoRows = new DataTable();
dtNoRows.Columns.Add("Info");
dtNoRows.Rows.Add("No records found");
dataGridView1.DataSource = dtNoRows;
}
else
dataGridView1.DataSource = dt;