data() {
return {
height: "450",
taskFields: {
id: "taskId",
name: "taskName",
startDate: "startDate",
duration: "duration",
endDate: "endDate",
progress: "progress",
dependency: "predecessor",
parentID: "parentID",
resourceInfo: "resources",
child: "subtasks"
},
...
resourceFields: {
id: "resourceId",
name: "resourceName",
unit: "resourceUnit",
group: "resourceGroup"
},
resources: [],
holidays: [],
eventMarkers: [],
gridLines: "Both",
splitterSettings: {
columnIndex: 3.1
},
labelSettings: {
leftLabel: "taskName",
rightLabel: "resources"
},
projectStartDate: new Date("01/28/2019"),
projectEndDate: new Date("06/10/2019"),
...
priorityParams: {
create: () => {
elem = document.createElement("input");
return elem;
},
read: () => {
return dropdownlistObj.text;
},
destroy: () => {
dropdownlistObj.destroy();
},
write: args => {
dropdownlistObj = new DropDownList({
dataSource: this.dsPriority,
fields: { text: "text", value: "value" },
value: args.rowData[args.column.field],
floatLabelType: "Auto"
});
dropdownlistObj.appendTo(elem);
}
},
};
},
mounted() {
const ganttChart = document.getElementById("GanttContainer")
.ej2_instances[0];
//ganttChart.fitToProject();
this.$api.pm.getProjectResources().then(res => {
if (ganttChart.resources) {
ganttChart.resources = [];
}
//ganttChart.resources=res;
for (const resource of res) {
ganttChart.resources.push(resource);
}
});
this.$api.pm.getProjectEventMarkers(12).then(res => {
if (ganttChart.eventMarkers) {
ganttChart.eventMarkers = [];
}
//ganttChart.eventMarkers=res;
for (const marker of res) {
ganttChart.eventMarkers.push(marker);
}
});
this.$api.pm.getHolidays().then(res => {
if (ganttChart.holidays) {
ganttChart.holidays = [];
}
//ganttChart.holidays=res;
for (const holiday of res) {
ganttChart.holidays.push(holiday);
}
});
},
<e-columns>
<e-column
field="taskId"
:visible="false"
:isPrimaryKey="true"
></e-column>
...
<e-column
field="priority"
headerText="priority"
editType="dropDownList"
:edit="priorityParams"
></e-column>
</e-columns>
priorityParams: {
create: () => {
elem = document.createElement("input");
return elem;
},
read: () => {
return dropdownlistObj.text;
},
destroy: () => {
dropdownlistObj.destroy();
},
write: args => {
dropdownlistObj = new DropDownList({
dataSource: this.dsPriority,
fields: { text: "text", value: "value" },
value: args.rowData[args.column.field],
floatLabelType: "Auto"
});
dropdownlistObj.appendTo(elem);
}
},
|
Sl.No. |
Query |
Syncfusion Comments
| |
|
1 |
I try to get the eventmark, holiday using axios and push the data to eventmarks & holidys something like bellow |
We are working on this query. We will validate and provide you with a response within two business days(May 19, 2021).
| |
|
2 |
When using the dropdown list on the column, how to set the value of the dropdown item? Bellow code sent selected text when PUT to server. |
You can send the value instead of the text to the server in the PUT method if you read the dropdownlistObj.value instead of text in the read method of the edit template. The following code snippets demonstrate the solution.
App.vue
| |
|
3 |
How to add a Dropdown Editor to the Add/Edit Dialog? Bellow link shows how to add textedit box, but how to changed to dropdown? |
You cannot add a drop down field in the add/edit dialog. The fields in the add/edit dialog reflect the columns in the Grid side of the Gantt Chart. If you wish to add a drop down field in the add/edit dialog, you have to include a custom column with edit type as drop down edit.
|
|
Sl.No. |
Query |
Syncfusion Comments
| |
|
1 |
I try to get the eventmark, holiday using axios and push the data to eventmarks & holidys something like bellow |
We are working on this query. We will validate and provide you with a response within two business days(May 19, 2021).
| |
|
2 |
When using the dropdown list on the column, how to set the value of the dropdown item? Bellow code sent selected text when PUT to server. |
You can send the value instead of the text to the server in the PUT method if you read the dropdownlistObj.value instead of text in the read method of the edit template. The following code snippets demonstrate the solution.
App.vue
| |
|
3 |
How to add a Dropdown Editor to the Add/Edit Dialog? Bellow link shows how to add textedit box, but how to changed to dropdown? |
You cannot add a drop down field in the add/edit dialog. The fields in the add/edit dialog reflect the columns in the Grid side of the Gantt Chart. If you wish to add a drop down field in the add/edit dialog, you have to include a custom column with edit type as drop down edit.
|
|
<e-column
field="Priority"
:editType="dropdownedit"
:edit="dpParams"
:valueAccessor="valueAccess"
></e-column>
|
|
methods: {
valueAccess: function (field, data, column) {
for (var i = 0; i < priority.length; i++) {
if (data.Priority === priority[i].value) {
return priority[i].text;
}
}
},
},
|
1 |
I try to get the eventmark, holiday using axios and push the data to eventmarks & holidys something like bellow |
We are working on this query. We will validate and provide you with a response within two business days(May 19, 2021).
|