protected void gvEmployee_InfrastructureExporting(object sender, GridInfrastructureExportingEventArgs e) { Telerik.Web.UI.ExportInfrastructure.Table tbl = e.ExportStructure.Tables[0]; int width = 595 / Convert.ToInt32(Session["_NOfColumns"].ToString()); for (int i = 1; i <= Convert.ToInt32(Session["_NOfColumns"].ToString()); i++) { tbl.Columns[i].Width = width; tbl.Columns[i].Style.BorderBottomStyle = BorderStyle.Solid; tbl.Columns[i].Style.BorderBottomWidth = 2; tbl.Columns[i].Style.BorderBottomColor = System.Drawing.Color.Black; tbl.Columns[i].Style.BorderTopStyle = BorderStyle.Solid; tbl.Columns[i].Style.BorderTopWidth = 2; tbl.Columns[i].Style.BorderTopColor = System.Drawing.Color.Black; tbl.Columns[i].Style.BorderLeftStyle = BorderStyle.Solid; tbl.Columns[i].Style.BorderLeftWidth = 2; tbl.Columns[i].Style.BorderLeftColor = System.Drawing.Color.Black; tbl.Columns[i].Style.BorderRightStyle = BorderStyle.Solid; tbl.Columns[i].Style.BorderRightWidth = 2; tbl.Columns[i].Style.BorderRightColor = System.Drawing.Color.Black; } Telerik.Web.UI.ExportInfrastructure.Row row = e.ExportStructure.Tables[0].Rows[1]; row.Style.Font.Bold = true; row.Style.BorderBottomStyle = BorderStyle.Solid; row.Style.BorderBottomWidth = 4; row.Style.BorderBottomColor = System.Drawing.Color.Black; row.Style.BorderTopStyle = BorderStyle.Solid; row.Style.BorderTopWidth = 4; row.Style.BorderTopColor = System.Drawing.Color.Black; }
protected void ReportGrid_InfrastructureExporting(object sender, GridInfrastructureExportingEventArgs e) { //Telerik.Web.UI.ExportInfrastructure.Table table = e.ExportStructure.Tables[0]; //for (int i = 1; (i <= table.Rows.Count); i++) //{ // for (int j = 1; (j <= ReportGrid.MasterTableView.RenderColumns.Count()); j++) // { // table.Cells[j, i].Format = "@"; // table.Cells[j, i].Value = table.Cells[j, i].Text; // } //} }