protected void TxtSearch_TextChanged(object sender, EventArgs e) { StrCondition = TxtSearch.Text; try { Ds = Obj_CCMaster.GetSearchItem(StrCondition); if (Ds.Tables.Count > 0 && Ds.Tables[0].Rows.Count > 0) { ViewState["CurrentTable1"] = Ds.Tables[0]; GrdReport.DataSource = Ds.Tables[0]; GrdReport.DataBind(); } else { GrdReport.DataSource = null; GrdReport.DataBind(); } GrdReport.Focus(); Ds = null; } catch (Exception ex) { throw new Exception(ex.Message); } }