예제 #1
0
 protected void btnExport_Click(object sender, EventArgs e)
 {
     if (gvReportGroup.Rows.Count > 0)
     {
         gvReportGroup.Columns[1].Visible = false;
         gvReportGroup.Columns[2].Visible = false;
         gvReportGroup.Columns[3].Visible = false;
         objCCWeb.ExportToExcel(gvReportGroup, frmReportGroupMaster, lblReportGroupDetails.Text, "Excel");
         gvReportGroup.Columns[0].Visible = true;
         gvReportGroup.Columns[1].Visible = true;
         gvReportGroup.Columns[2].Visible = true;
         gvReportGroup.Columns[3].Visible = true;
     }
 }
 protected void btnExport_Click(object sender, EventArgs e)
 {
     if (gvInstitute.Rows.Count > 0)
     {
         gvInstitute.HeaderRow.Cells[1].Visible = false;
         gvInstitute.HeaderRow.Cells[3].Visible = false;
         for (int intLoop = 0; intLoop < gvInstitute.Rows.Count; intLoop++)
         {
             gvInstitute.Rows[intLoop].Cells[1].Visible = false;
             gvInstitute.Rows[intLoop].Cells[3].Visible = false;
         }
         objCCWeb.ExportToExcel(gvInstitute, frmMTClientCompany, lblSchoolInformation1.Text, "Excel");
         for (int intLoop = 0; intLoop < gvInstitute.Rows.Count; intLoop++)
         {
             gvInstitute.Rows[intLoop].Cells[1].Visible = true;
             gvInstitute.Rows[intLoop].Cells[3].Visible = true;
         }
         ClientScript.RegisterStartupScript(this.GetType(), "", "<script>" + strHideID + "</script>");
     }
 }
예제 #3
0
 protected void btnPrintgrid_Click(object sender, EventArgs e)
 {
     objCCWeb.ExportToExcel(gvAcademicSession, frmMTAcademicSessionMaster, lblAcademicSessionDetails.Text, "Excel");
 }
예제 #4
0
 protected void btnExport_Click(object sender, EventArgs e)
 {
     dtDate1 = calDetails.VisibleDate.Year != 1 ? calDetails.VisibleDate.Date : DateTime.Today.Date;
     objCCWeb.ExportToExcel(gvEventDetails, form1, "Event Details For " + dtDate1.ToString("MMMM") + " - " + dtDate1.Year, "Excel");
 }