Hi,
I have the detail in the grid view with check box . When i select some rows and click on show it should be displayed in another grid view with the check box, simultaneously selected rows should be removed from the first grid. But i didn't get a proper solution. Please help me if any one know about my doubt please......

Upendra Pratap ShahiPosted Sep 9, 2015, 6:52 AM
Upendra Pratap ShahiPosted Sep 9, 2015, 7:45 AM
///
/// Export to Excel
///
/// Gridview Name
/// File Name
public static void ExportToExcel(System.Web.UI.WebControls.GridView gv,string FileName)
{
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.AddHeader("content-disposition",string.Format("attachment; filename={0}","" + FileName + ".xls"));
HttpContext.Current.Response.ContentType = "application/ms-excel";
System.IO.StringWriter sw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
gv.AllowPaging = false;
gv.RenderControl(htw);
HttpContext.Current.Response.Write(sw.ToString());
HttpContext.Current.Response.End();
}
///
/// Export to Excel without VerifyRenderingInServerForm
///
/// Gridview Name
/// File Name
public static void ExportToExcelNewFrm(System.Web.UI.WebControls.GridView gv,string FileName)
{
string style = @" ";
HttpContext.Current.Response.ClearContent();
// Create form tag
System.Web.UI.HtmlControls.HtmlForm form1 = new System.Web.UI.HtmlControls.HtmlForm();
gv.AllowPaging = false;
form1.Controls.Add(gv);
HttpContext.Current.Response.AddHeader("content-disposition",string.Format("attachment; filename={0}","" + FileName + ".xls"));
HttpContext.Current.Response.ContentType = "application/ms-excel";
System.IO.StringWriter sw = new System.IO.StringWriter();
System.IO.StringWriter header = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
gv.RenderControl(htw);
// Style is added dynamically
HttpContext.Current.Response.Write(style);
HttpContext.Current.Response.Write(sw.ToString());
HttpContext.Current.Response.End();
}
Upendra Pratap ShahiPosted Sep 9, 2015, 7:36 AM
Linto P ThomasPosted Sep 9, 2015, 7:33 AM
Upendra Pratap ShahiPosted Sep 9, 2015, 6:54 AM
Upendra Pratap ShahiPosted Sep 9, 2015, 6:53 AM
Linto P ThomasPosted Sep 9, 2015, 6:51 AM
Linto P ThomasPosted Sep 9, 2015, 6:50 AM
Upendra Pratap ShahiPosted Sep 9, 2015, 6:24 AM
Anurag SarkarPosted Sep 9, 2015, 2:44 AM