Hi
I am using ejs-gantt chart in asp.net core. how to allow editing for only one item in resources.
i push extra items in resource tab.please check in below screenshot.
i attached code file please check it.i request to you please resolve this issue as soon as possible.
Issues
|
Sl.No. |
Query |
Syncfusion Comments
| |
|
1 |
How can I allow edit true for UseQty and other item allow editing false in resources tab. |
You can make use of the openEditDialog request type in the actionComplete event to set the allowEditing property of the columns as false. The following code snippets demonstrate the solution.
Index.cshtml
| |
|
2 |
how can put space between ItemNo,Quantity, and UseQty in resource tab. |
Similarly, you can use the openEditDialog dialog requestType in the actionComplete event to set the width of the columns. The following code snippets demonstrate the solution.
Index.cshtml
|
Hi
above you given code i put allowediting code in actionComplete function it's working proper. but when i did add code in actionComplete then selected checkbox not showing inside resource tab.please check below screenshots.
2. after add code in actioncomplete function.but not showing selected item.
|
function actionComplete(args) {
var ganttObj = document.getElementById("Gantt").ej2_instances[0];
if (args.action == "OpenDialog" && args.requestType == "openEditDialog") {
var recordData = args.data;
var tabObj = document.getElementById("Gantt_Tab").ej2_instances[0];
tabObj.selected = function (args) {
var id = args.selectedContent.childNodes[0].id;
if (id === ganttObj.element.id + 'ResourcesTabContainer') {
var resourceTreeGrid_1 = ganttObj.element.querySelector('#' + id).ej2_instances[0];
var resources_1 = recordData.ganttProperties.resourceInfo;
var currentViewData = resourceTreeGrid_1.getCurrentViewRecords();
if (resources_1 && resources_1.length > 0) {
currentViewData.forEach(function (data, index) {
for (var i = 0; i < resources_1.length; i++) {
if (data.taskData[ganttObj.resourceFields.id] === resources_1[i][ganttObj.resourceFields.id] &&
!ej.base.isNullOrUndefined(resourceTreeGrid_1.selectionModule) &&
resourceTreeGrid_1.getSelectedRowIndexes().indexOf(index) === -1) {
resourceTreeGrid_1.selectRow(index);
}
}
});
}
}
}
}
}
|