[cs]
public ActionResult ExportToPdf(string GanttModel)
{
PdfExport exp = new PdfExport();
//...
return exp.Export(ganttProp, DataSource, pdfExp);
}
[cshtml]
$("#GanttContainer").ejGantt({
//...
toolbarSettings: {
showToolbar: true,
toolbarItems: [
ej.Gantt.ToolbarItems.PdfExport,
]
},
toolbarClick: toolbarclick
});
function toolbarclick(args) {
var id = $(args.currentTarget).attr("id");
if (id == "GanttContainer_pdfExport") {
this.exportGrid("http://localhost:59419/Gantt/ExportToPdf", "", false);
args.cancel = true;
}
} |