@(Html.EJ().Gantt("GanttContainer")
//To Map the serverside exporting action
.Mappers(mp => mp.ExportToPdfAction("Gantt/ExportToPdf"))
//To customize Gantt Taskbars and Progress bar
.ParentTaskbarBackground("#56bc0d")
.ParentProgressbarBackground("#933969")
.TaskbarBackground("#a4b9db")
.ProgressbarBackground("#2f87c6")
.ToolbarSettings(tool =>
{
tool.ShowToolbar(true);
tool.ToolbarItems(new List<GanttToolBarItems>()
{
GanttToolBarItems.PdfExport,
});
}))@(Html.EJ().ScriptManager()) |
public void ExportToPdf(string GanttModel)
{
PdfExport exp = new PdfExport();
PdfDocument document = new PdfDocument();
document.PageSettings.Height = 1587;
document.PageSettings.Width = 1123;
var DataSource = this.GetEditingDataSource();
GanttProperties obj = ConvertGanttObject(GanttModel);
GanttPdfExportSettings settings = new GanttPdfExportSettings();
settings.Theme = GanttExportTheme.FlatSaffron;
settings.PageOrientation = PdfPageOrientation.Portrait;
exp.Export(obj, (IEnumerable)DataSource, settings, "Gantt", document, true);
} |
Hi,
I set the colours in queryTaskbarInfo event, so, in function of status I set different colours.
So, I can't set the taskbarcolours in gantt properties