protected void gvNationality_GridExporting1(object sender, GridExportingArgs e)
    {
        switch (e.ExportType)
        {
        case ExportType.Excel:
            //    string css = "<style> body { border:solid 0.1pt #CCCCC; }</style>";
            //e.ExportOutput = e.ExportOutput.Replace("</head>", css + "</head>");
            break;

        case ExportType.ExcelML:
            //do something with the e.ExportOutput value
            break;

        case ExportType.Word:
            //do something with the e.ExportOutput value
            break;

        case ExportType.Csv:
            //do something with the e.ExportOutput value
            break;

        case ExportType.Pdf:
            //you can't change the output here - use the PdfExporting event instead
            break;
        }
    }
示例#2
0
 internal static void OnGridExporting(object sender, GridExportingArgs e)
 {
     if (e.ExportType == ExportType.Word)
     {
         e.ExportOutput = e.ExportOutput.Replace("<body>", "<body><div class=WordSection1>");
         e.ExportOutput = e.ExportOutput.Replace("</body>", "</div></body>");
     }
 }
示例#3
0
 protected void rdgTxns_GridExporting(object sender, GridExportingArgs e)
 {
     if (e.ExportType == ExportType.Excel)
     {
         string css = "<style> td {text-align:center}</style>";
         e.ExportOutput = e.ExportOutput.Replace("</head>", css + "</head>");
     }
 }
示例#4
0
    protected void RadGrid1_GridExporting(object sender, GridExportingArgs e)
    {
        using (FileStream fs = new FileStream(String.Format("{0}.{1}", PhysicalPathToFile, RadComboBox1.SelectedValue), FileMode.Create))
        {
            byte[] output = Encoding.GetEncoding(WesternEuropean).GetBytes(e.ExportOutput);
            fs.Write(output, 0, output.Length);
        }

        Response.Redirect(Request.Url.GetLeftPart(UriPartial.Path).ToString());
    }
示例#5
0
    protected void RadGrid1_GridExporting(object sender, GridExportingArgs e)
    {
        using (FileStream fs = new FileStream(String.Format("{0}.{1}", PhysicalPathToFile, RadComboBox1.SelectedValue), FileMode.Create))
        {
            byte[] output = Encoding.GetEncoding(WesternEuropean).GetBytes(e.ExportOutput);
            fs.Write(output, 0, output.Length);
        }

        Response.Redirect(Request.Url.GetLeftPart(UriPartial.Path).ToString());
    }
        void Grid_GridExporting(object source, GridExportingArgs e)
        {
            log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            try
            {
                GridFunctions.HandleGridExporting(Grid, Me.Grid, source, e, this.Page.Response);
            }
            catch (Exception ex)
            {
                log.Error(ex);
                throw ex;
            }
        }
示例#7
0
文件: Roles.aspx.cs 项目: kenchic/SAF
 protected void rgDatos_GridExporting(object sender, GridExportingArgs e)
 {
     //Insertar encabezado en las primeras filas de la hoja de excel
     string customHTML = "<div style='text-align:center; font-weight:bold; font-size:1.25em;'>Reporte</div>" + "<div style='text-align:center; font-weight:bold; font-size:1.25em;'>SAF</div>" + "<div style='text-align:center; font-weight:bold; font-size:1.25em;'>" + Nombremodulo + "</div><br />";
     e.ExportOutput = e.ExportOutput.Replace("<body>", String.Format("<body>{0}", customHTML));
 }
 protected void gvNationality_GridExporting(object source, GridExportingArgs e)
 {
 }
示例#9
0
 protected void GridView1_GridExporting(object sender, GridExportingArgs e)
 {
 }
示例#10
0
 public static void HandleGridExporting(RadGrid Grid, Grid grid, object source, GridExportingArgs e, HttpResponse Response)
 {
     if (e.ExportType == ExportType.Csv)
     {
         Response.ContentType = "application/csv";
         Response.AddHeader("Content-Type", "text/csv");
         Response.BinaryWrite(new ASCIIEncoding().GetBytes(e.ExportOutput));
         Response.End();
     }
 }
示例#11
0
 protected void RadGrid1_OnGridExporting(object sender, GridExportingArgs e)
 {
     Helper.GirdHelper.OnGridExporting(sender, e);
 }
示例#12
0
 protected void RG_PurchaseSet_GridExporting(object source, GridExportingArgs e)
 {
     e.ExportOutput = e.ExportOutput.Replace("\"0", "=\"0");
 }