Hi Jignesh,
We have analyzed your query.
Please confirm that are you exporting the back-end data or front-end data. In the sample we have shared, we are passing the client-side data to the server-side PdfExport method and exporting the Gantt.
And we have exported the server-side as well with start date and end date as null. Please refer the below code snippet,
|
public void PdfExport(string GanttModel)
{
var DataSource = GetData();
PdfExport exp = new PdfExport();
GanttProperties obj = ConvertGanttObject(GanttModel);
GanttPdfExportSettings settings = new GanttPdfExportSettings();
settings.Theme = GanttExportTheme.FlatSaffron;
settings.Locale = Request.Form["locale"];
//exp.Export(obj, (IEnumerable)exportData, settings, "Gantt"); // Exporting client-side data
exp.Export(obj, (IEnumerable)DataSource, settings, "Gantt"); // Exporting server-side data
} |
We are suspecting that the mapping name should be different between the dataSource and the ganttObject. This the reason for the exception.
The taskNameMapping property in the GanttObject is “taskID”, but in the datasource this is “TaskID”, due to this kind of mismatching exception may arise. To overcome this, please change the field name in the datasource. Please refer the below images.
[datasource]
[ganttObject]
Please contact us if you need any further details on this.
Thanks,
Gopinath M