Hi Remi,
Please find the response below.
Query 1: 1) Is it possible to make a week starting a Monday, currently a week is starting a Saturday ?
Solution: Currently there is no support to customize the week’s start day in Gantt control. We have already logged feature regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let us know if you require further assistance on this.
Query 2: Is there a way to make a task to always fill a week (by moving or resizing it) ?
Solution: We can fill week by resizing the taskbar in the month ScheduleHeaderType and DurationUnit as “day”. Please find the below code snippet to render the gantt in month schedule header type.
<form id="form1" runat="server" onsubmit="return false" style="overflow: hidden; padding:0; margin: 0;height:100%;width:100%;"> <ej:Gantt ID="Gantt" runat="server" DurationUnit="day" AllowGanttChartEditing="true" //…> <ScheduleHeaderSettings ScheduleHeaderType= "month" MonthHeaderFormat="MMM yyyy" WeekHeaderFormat="M/dd"></ScheduleHeaderSettings> </ej:Gantt> </form> |
We have also prepared a sample based on this and you can find the sample under the following location.
Sample: http://www.syncfusion.com/downloads/support/forum/119582/ze/MonthscheduleHeader426434478
Is this your requirement or else please revert back to us by modifying this sample
Regards,
Mahalakshmi K.
Thanks for your reply.
I would like to force the task to start a monday and end a sunday, so I did the following :
function ActionComplete(args) {
var tache = args.item;
if (tache != null) {
var dtDebut = new Date(tache.Start);
var dtFin = new Date(tache.End);
if (dtDebut.getDay() != 1) {
dtDebut.setDate(dtDebut.getDate() - dtDebut.getDay() + 1);
tache.Start = (dtDebut.getMonth() + 1) + "/" + dtDebut.getDate() + "/" + dtDebut.getFullYear();
}
if (dtFin.getDay() != 0) {
dtFin.setDate(dtFin.getDate() - dtFin.getDay());
tache.End = (dtFin.getMonth() + 1) + "/" + dtFin.getDate() + "/" + dtFin.getFullYear();
}
PageMethods.UpdateTacheWeb(tache);
}
}
My problem is that the task's start and end date is well updated as I expect in the object ("tache" here) but the Gantt control is not refreshed with the new task start and end date (I mean visually).
I also checked the dataSource ($("#<%=EjGantt.ClientID%>").data("ejGantt").model.dataSource) and the task is well updated.
Did I miss something ?
Thanks, Rémi.
Hi Remi,
We regret for the inconvenience caused.
At present there is no support for refreshing the Gantt chart within “ActionComplete”, “TaskbarEdited” and “EndEdit” client side events after modifying the datasource. Also we have logged a feature request regarding this.
A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let us know if you require further assistance on this.
Regards,
John R