Check the below code
just replace the ' by ''
private void SearchText(string strSearchText)
{
DataTable dt = GetRecords();
DataView dv = new DataView(dt);
string SearchExpression = null;
if (!String.IsNullOrEmpty(strSearchText))
{
SearchExpression = string.Format("{0} '%{1}%'", grdSearch.SortExpression, strSearchText.Replace("'","''"));
dv.RowFilter = "country_name like" + SearchExpression;
grdSearch.DataSource = dv;
grdSearch.DataBind();
}
else
ScriptManager.RegisterStartupScript(this, this.GetType(), "msg", "alert('Enter Search Text')", true);
}