private static void ExportingHandler(object sender, TreeGridExcelExportingEventArgs e) { if (e.CellType == TreeGridCellType.HeaderCell) { e.Style.Font.Bold = true; } e.Style.BeginUpdate(); e.Style.Borders[ExcelBordersIndex.EdgeLeft].LineStyle = ExcelLineStyle.Thin; e.Style.Borders[ExcelBordersIndex.EdgeRight].LineStyle = ExcelLineStyle.Thin; e.Style.Borders[ExcelBordersIndex.EdgeTop].LineStyle = ExcelLineStyle.Thin; e.Style.Borders[ExcelBordersIndex.EdgeBottom].LineStyle = ExcelLineStyle.Thin; e.Style.EndUpdate(); e.Handled = true; }
private static void ExportingHandler(object sender, TreeGridExcelExportingEventArgs e) { if (e.CellType == TreeGridCellType.HeaderCell) { e.Style.ColorIndex = ExcelKnownColors.Light_yellow; e.Style.Font.Color = ExcelKnownColors.Dark_red; e.Style.Font.Bold = true; e.Style.Font.Size = 12; e.Style.Font.FontName = "Segoe UI"; e.Handled = true; } else if (e.CellType == TreeGridCellType.RecordCell) { e.Style.Font.Color = ExcelKnownColors.Dark_red; e.Handled = true; } }