@(Html.EJ().Gantt("GanttContainer")
.ClientSideEvents(cs =>
{
cs.ActionBegin("actionBegin");
})
//…
function actionBegin(args){
if(args.requestType == "OpenAddDialog"){
var tab = $("#GanttContainerAddTab").ejTab("instance");
tab.removeItem(0);
}
else if(args.requestType == "openEditDialog"){
var tab = $("#GanttContainerEditTab").ejTab("instance");
tab.removeItem(0);
}
} |
@(Html.EJ().Gantt("GanttContainer")
//…
.AddDialogFields(ad =>
{
ad.Field("Predecessor").Add();
})
.EditDialogFields(ed =>
{
ed.Field("Predecessor").Add();
}) |
In my code, when I try save the predecessor relationships in form I get a javascript error when I click on save.
I'm using version 15.2.0.40
@(Html.EJ().Gantt("GanttContainer")
//…
.ClientSideEvents(cs =>
{
cs.ActionBegin("actionBegin");
})
.AddDialogFields(ad =>
{
ad.Field("Predecessor").Add();
})
.EditDialogFields(ed =>
{
ed.Field("Predecessor").Add();
})
)
<script type="text/javascript">
function actionBegin(args){
if(args.requestType == "OpenAddDialog"){
var tab = $("#GanttContainerAddTab").ejTab("instance");
tab.option("hiddenItemIndex", [0]); // Hide tabs
}
else if(args.requestType == "openEditDialog"){
var tab = $("#GanttContainerEditTab").ejTab("instance");
tab.option("hiddenItemIndex", [0]); // Hide tabs
}
}
</script> |
Thanks a lot!
Hi again,
I've another problem.
In my gantt, I've enabled AllowGanttChartEditing, so, the user can set relationships, resize the task size (duration) and move the task (change the start date).
But now, I need separate permissions, some users only can create relationships but NOT resize or move the task bar and other users inverse.
When I AllowGanttChartEditing, the user can do it all.
How can I do that the user only set relationships, not change taskbar and vice versa?
Thanks