<ej:Gantt ID="Gantt"
//…
DateFormat="MM/dd/yyyy"
> |
Hi,
I have tryed the example you have prepared, but still get an error.
Picture of the error is attached.
Cheers
Martin
Hi,
Thanks for the answer, I did some research and I am able to break it down to the following lines.
This is my config for the Gantt Control what is facing the error.
<ej:Gantt ID="GanttControlDefault" runat="server" Enabled="true" AllowDragAndDrop="true" AllowColumnResize="true" ShowColumnChooser="true" AllowMultiSorting="true"
Locale="de-DE"
DateFormat="dd.MM.yyyy"
ToolbarClick="toolbarClick"
ContextMenuOpen="contextMenuOpen"
AllowKeyboardNavigation="true"
ShowResourceNames="true"
AllowSorting="true"
EnablePredecessorValidation="true"
SplitterPosition="40%"
RenderBaseline="true"
IsResponsive="true"
AllowGanttChartEditing="true"
EnableContextMenu="true"
ChildMapping="Children"
BaselineStartDateMapping="BaselineStart"
BaselineEndDateMapping="BaselineEnd"
PredecessorMapping="Predecessors"
RowDragStop="rowDragStop"
TaskIdMapping="TaskId"
TaskNameMapping="TaskName"
ParentTaskIdMapping="ParentId"
ResourceInfoMapping="Resources"
ResourceNameMapping="ResourceName"
ResourceIdMapping="ResourceId"
StartDateMapping="StartDate"
EndDateMapping="EndDate"
DurationUnit="Day"
DurationMapping="Duration"
ProgressMapping="Progress"
NotesMapping="Note"
TreeColumnIndex="1"
OnServerPdfExporting="GanttControlDefault_ServerPdfExporting"
OnServerExcelExporting="GanttControlDefault_ServerExcelExporting"
ActionComplete="ActionComplete">
<EditSettings AllowEditing="true" AllowAdding="true" AllowDeleting="true" AllowIndent="true" EditMode="normal" />
<ScheduleHeaderSettings ScheduleHeaderType="Week" />
<ToolbarSettings ShowToolbar="true" ToolbarItems="add,edit,delete,update,cancel,indent,outdent,pdfExport,excelExport,expandAll,collapseAll,prevTimeSpan,nextTimeSpan,criticalPath,search">
<CustomToolbarItems>
<ej:GanttCustomToolbarItem Text="Save" TooltipText="Save" />
</CustomToolbarItems>
</ToolbarSettings>
<DragTooltip ShowTooltip="true" />
<SizeSettings Height="100%" Width="100%" />
</ej:Gantt>
If I remove the following lines
<CustomToolbarItems>
<ej:GanttCustomToolbarItem Text="Save" TooltipText="Save" />
</CustomToolbarItems>
then the PDF export is working as expected.
Any ideas?
Martin
Good Morning
I did some additional tests for PDF Export
Here my findings:
I setup the GanttControl like this to match my location:
<ej:Gantt ID="Gantt" //… Locale="de-DE" DateFormat="dd.MM.yyyy" > |
List<Holiday> lstHoliday = Db.GetHolidayData(); foreach (var item in lstHoliday) { GanttControlDefault.Holidays.Add(new Syncfusion.JavaScript.Models.Holiday() { Day = item.DateToString("dd.MM.yyyy"), Label = item.HolidayName, Background = item.Color }); } List<StripeLine> lstStripeLine = Db.GetStripeLineData(); foreach (var item in lstStripeLine) { GanttControlDefault.StripLines.Add(new Syncfusion.JavaScript.Models.GanttStripLine() { Day = item.StripDateToString("dd.MM.yyyy"), Label = item.StripName, LineColor = item.Color, LineStyle = item.LineStyle, LineWidth = item.LineWidth }); } GanttControlDefault.StripLines.Add(new Syncfusion.JavaScript.Models.GanttStripLine() { Day = DateTime.Now.ToString("dd.MM.yyyy"), Label = "Today", LineColor = "ForestGreen", LineStyle = "dotted", LineWidth = 2 }); |