I know that if set ShowWorkDays(true) only workdays will be shown and I can set WorkWeekStart and WorkWeekEnd.
But what if I want to keep showing the weekends and still have monday as first day of the week?
Hello,
my problem is related to the destroy action, when called a js error is returned (see attached file), but when you call an update on another task the gantt fires the update and then the pending destroy action.
my destroy action:
[AcceptVerbs(
"Post"
)]
public
ActionResult ResourcePlanningDeleteLogic([DataSourceRequest] DataSourceRequest request, ResourcePlanningViewModel ResourcePlanning)
{
if
(ResourcePlanning !=
null
&& ModelState.IsValid)
{
_resourcePlanningService.Deletelogic(ResourcePlanning);
}
return
Json(
new
[] { ResourcePlanning }.ToDataSourceResult(request, ModelState));
}
my gantt:
@(Html.Kendo().Gantt<ResourcePlanningViewModel, ResourcePlanningDependencyViewModel>
()
.Name(
"gantt"
)
.Columns(columns =>
{
columns.Bound(c => c.Title).Title(
"Pianificazione"
).Width(150).Editable(
false
).Sortable(
true
);
columns.Bound(c => c.Start).Format(
"{0: dd/MM/yyyy}"
).Title(
"Data Da"
).Width(50).Editable(
false
).Sortable(
true
);
columns.Bound(c => c.End).Format(
"{0: dd/MM/yyyy}"
).Title(
"Data A"
).Width(50).Editable(
false
).Sortable(
true
);
columns.Bound(c => c.ConsRuleHours).Title(
"H Reg Cons"
).Width(60).Editable(
false
).Sortable(
true
);
columns.Bound(c => c.IsFrozen).Title(
"Congelata"
).Width(50).Editable(
false
).Sortable(
false
);
})
.Views(views =>
{
views.DayView();
views.WeekView(weekView => weekView.Selected(
false
)).DayHeaderTemplate(
"#=kendo.toString(start, 'dd/MM')#"
);
views.WeekView(weekView => weekView.Selected(
false
)).WeekHeaderTemplate(
"#=kendo.toString(start, 'D')# - #=kendo.toString(kendo.date.addDays(end, -1), 'D')#"
).Selected(
true
);
views.MonthView(monthView => monthView.Selected(
false
).MonthHeaderTemplate(
"#=kendo.toString(start, 'M')#"
)).WeekHeaderTemplate(
"#=kendo.toString(start, 'dd/MM')#"
);
})
.Height(700)
.ShowWorkHours(
false
)
.ShowWorkDays(
false
)
.Snap(
false
)
.Toolbar(tb => tb.Pdf())
.DataSource(d => d
.Model(m =>
{
m.Id(f => f.Id);
m.ParentId(f => f.ParentID);
m.Field(f => f.Expanded).DefaultValue(
false
);
})
.Read(read => read.Action(
"ResourcePlanningRead"
,
"ResourcePlanning"
))
.Destroy(
"ResourcePlanningDeleteLogic"
,
"ResourcePlanning"
)
.Update(update => update.Action(
"ResourcePlanningUpdate"
,
"ResourcePlanning"
).Data(
"onUpdateCreate"
))
)
.DependenciesDataSource(d => d
.Model(m =>
{
m.Id(f => f.DependencyID);
m.PredecessorId(f => f.PredecessorID);
m.SuccessorId(f => f.SuccessorID);
})
.Read(
"ReadResourcePlanningDependencies"
,
"Gantt"
)
)
.Pdf(pdf => pdf
.FileName(
"Pianificazione Risorse.pdf"
)
.ProxyURL(Url.Action(
"Pdf_Export_Save"
,
"Gantt"
))
)
.Editable(editable => editable.Create(
false
)
.Resize(
false
)
.DragPercentComplete(
false
)
.Reorder(
false
)
.DependencyCreate(
false
)
.DependencyDestroy(
false
)
.Confirmation(
true
)
.Destroy(
true
)
.Move(
false
)
.TemplateId(
"TaskEditorTemplate"
)
)
.Messages(m => m.Save(
"Salva"
)
.Cancel(
"Annulla"
)
.Destroy(
"Cancella"
)
.DeleteTaskConfirmation(
"Sei sicuro di voler cancellare la pianificazione?"
)
.DeleteTaskWindowTitle(
"Cancella Pianificazione"
)
.Editor(e => e.EditorTitle(
"Aggiorna Pianificazione"
)
.AssignButton(
"Aggiungi Regola di Consuntivazione"
)
.ResourcesEditorTitle(
"Regola di Consuntivazione"
))
.Views(v => v.Day(
"Giornaliera"
)
.Week(
"Settimanale"
)
.Month(
"Mensile"
))
.Actions(a => a.Pdf(
"Esporta in PDF"
))
)
)
Is there maybe a data error that prevents the first call to the destroy action?
Example task "Task_A" and task "Task_B" are linked by the dependency "Finish to Start" (FS).
https://docs.telerik.com/devtools/aspnet-ajax/controls/gantt/server-side-programming/objects/dependencies
1. Your control can execute the following script:
- if the "end date" of the task "Task_A" changes, does the "start date" of the task "Task_B" change?
Your control can execute the following script:
- if the "end date" of the task "Task_A" changes, does the "start date" of the task "Task_B" change?
I tried to do it in the demo version. But, if I did everything right, then it does not work for me.
https://demos.telerik.com/aspnet-ajax/gantt/examples/overview/defaultcs.aspx
2. Do you have a different web control(Gantt) that can solve the problem of p. 2?
(ASP.NET AJAX, ASP.NET MVC, Blazor, PHP, JSP, Silverlight)
How do you remove the "Add Task" button? My Gantt chart is completely driven from database values, so I don't want my users to be able to add tasks to the Gantt, they only need to see schedule.
Thanks
Ken
How do you color a task to represent the percent completion?
The demo's at https://demos.telerik.com/aspnet-core/gantt/task-template and https://demos.telerik.com/aspnet-core/gantt/api show it but I couldn't tell how it was being done. I am looking to do something like these demo's do.
Thanks
Ken
Hi,
I am currently using a trial version of Kendo UI for ASPNet Core. For my
application I am looking to use a Gantt like control.
I need to be able to show the Gantt displaying the Tasks that users need to
complete. These are assigned to a particular place in a factory.
Would there be a way in this control to show the "assigned
locations" down the left (where task id, title, start & end are in the
example), and then all the tasks are displayed on the right on the correct
location row; at the correct date/time etc.
Thanks
Ashley