File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
ej2-asp-core-mvc/code-snippet/gantt/pdf-export/showhidecolumns Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
@(Html.EJS().Gantt("GanttContainer").DataSource((IEnumerable<object>
2
2
)ViewBag.DataSource).AllowPdfExport(true).TaskFields(ts => ts.Id(
3
- "TaskId").Name("TaskName").StartDate("StartDate").Duration("Duration").Progress("Progress").Child("SubTasks ")).Columns(col =>
3
+ "TaskId").Name("TaskName").StartDate("StartDate").Duration("Duration").Progress("Progress").ParentID("ParentId ")).Columns(col =>
4
4
{
5
5
col.Field("TaskId").Width(100).HeaderText("Task Id").Add();
6
6
col.Field("TaskName").HeaderText("Task Name").Width(150).Add();
Original file line number Diff line number Diff line change 1
1
<ejs-gantt id='GanttContainer' dataSource="ViewBag.DataSource" toolbar="@(new List<string>() { "PdfExport" })"
2
2
toolbarClick="toolbarClick" beforePdfExport="beforePdfExport" allowPdfExport="true">
3
- <e-gantt-taskfields id="TaskId" name="TaskName" startDate="StartDate" duration="Duration" progress="Progress" child="SubTasks ">
3
+ <e-gantt-taskfields id="TaskId" name="TaskName" startDate="StartDate" duration="Duration" progress="Progress" parentID="ParentId ">
4
4
</e-gantt-taskfields>
5
5
<e-gantt-columns>
6
6
<e-gantt-column field="TaskId" headerText="Task ID" width="150" textAlign="Left"></e-gantt-column>
15
15
var gantt = document.getElementById("GanttContainer").ej2_instances[0];
16
16
if (args.item.id === 'GanttContainer_pdfexport') {
17
17
gantt.pdfExport();
18
- }
18
+ }
19
19
}
20
20
function beforePdfExport(args) {
21
21
var obj = (document.getElementById('GanttContainer')).ej2_instances[0]
You can’t perform that action at this time.
0 commit comments