|
Query |
Syncfusion Comments | |
|
1: I was trying to set up a custom Add/Edit modal with a field named CapacidadeDiariaHoras, but i was not able doing that way in my code. I tried to debug the columns variable on my Load Javascript function and it only returned me the resource Columns, not the task ones |
In resource view Gantt, it is possible to display custom columns related to resource object alone in the TreeGrid part. But this custom column field will not be displayed in built-in add/edit dialog modal. Since the dialog will contain only the fields related to the specific tasks, it is not possible to include a custom column in the dialog which belongs to a resource object.
Also regarding custom add/edit modal, it is possible to suppress the rendering of default modal using actionBegin event with requestType argument as openAddDialog or openEditDialog, and thereby you can display your custom modal. But at present it is not possible to update a task in resource view Gantt at run time, for this we have logged a feature report regarding for updating a task dynamically in resource view Gantt. It will be implemented in of our upcoming 2018 volume 2 main release.
Using this feature, you can update the tasks using custom add/edit modal in resource view Gantt. | |
|
2: I'm with the same problem to add CapacidadeDiariaHoras inside a tooltip: it jsut does not show that custom information, just the default ones. Tried to do it directly or creating a own html to a tooltip display. | ||
|
3: There is a way, like the custom html for a tooltip, to create a custom html to a Add/Edit modal? | ||
|
4. I also noticed that there is no confirmation modal/popup before excluding a task in a Gantt control. I think it is possible creating a javascript function to intercept the delete action: how can we do it? |
We have prepared the work around and rendered confirm dialog for child resource delete action using context menu. Using ‘actionBegin’ client side event we can render confirm dialog while deleting child resource.
Please find the code example below:
|
|
[CSHTML]
@(Html.EJ().Gantt("ResourceViewGantt")
.ClientSideEvents(cs =>
{
cs.ActionBegin("actionBegin");
})
.GroupCollection(ViewBag.groups)
.Resources(ViewBag.resources)
.Datasource(ViewBag.datasource)
) @(Html.EJ().ScriptManager())
<script type="text/javascript">
function actionBegin(args) {
if (args.requestType == "OpenAddDialog") {
args.cancel = true;
}
if (args.requestType == "openEditDialog") {
args.cancel = true;
}
}
</script> |
|
[CSHTML]
@(Html.EJ().Gantt("ResourceViewGantt")
//..
.ClientSideEvents(cs =>
{
cs.QueryTaskbarInfo("queryTaskbarInfo");
})
.Datasource(ViewBag.datasource)
) @(Html.EJ().ScriptManager())
<script type="text/javascript">
function queryTaskbarInfo(args) {
var id = [1,3,6,9]; // “TaskId” of records which you need to provide colors.
if(id.indexOf(parseInt(args.data.taskId)) != -1){
args.progressbarBackground = "Green"; // Provide color for “progressbarBackground” which gets from database
args.taskbarBackground = "red"; // Provide color for “taskbarBackground” which gets from database
}
</script> |
|
[CSHTML]
@(Html.EJ().Gantt("ResourceViewGantt")
//..
.ClientSideEvents(cs =>
{
cs.TaskbarEditing("taskbarEditing");
})
.Datasource(ViewBag.datasource)
) @(Html.EJ().ScriptManager())
<script type="text/javascript">
function taskbarEditing(args) {
args.roundOffDuration = true;
}
</script> |