We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Customization of week header and task moving

Thread ID:

Created:

Updated:

Platform:

Replies:

119582 Jul 10,2015 03:57 AM Jul 20,2015 08:32 AM ASP.NET Web Forms 5
loading
Tags: Gantt
Rémi
Asked On July 10, 2015 03:57 AM

Hi,

I have two questions about the Gantt control :

1) Is it possible to make a week starting a Monday, currently a week is starting a Saturday ?

2) Is there a way to make a task to always fill a week (by moving or resizing it) ?

Thanks, Rémi.

Mahalakshmi Karthikeyan [Syncfusion]
Replied On July 13, 2015 01:31 PM

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.


Rémi
Replied On July 15, 2015 06:05 AM

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.


John Rajaram [Syncfusion]
Replied On July 17, 2015 07:23 AM

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


Rémi
Replied On July 17, 2015 08:22 AM

Hi,

Excuse me to insist, but I don't understand why I couldn't do this.
I would like to make the task to dynamically adjust his width exactly the same way the task's width is adjusted when we move the task on a holiday column.

Thanks, Rémi.

Mahalakshmi Karthikeyan [Syncfusion]
Replied On July 20, 2015 08:32 AM

Hi Remi,

Sorry about the inconvenience caused.

For your kind information the current behavior of the Gantt control is that, when we edit  a taskbar , initially the view will be refreshed with the edited values from the source and then with the new edited values the “ActionComplete” will be triggered , Since the Gantt has already been refreshed it is not possible to refresh again within “ActionComplete” event , But the changes made within the event to the datasource will be there , Currently we are not having support to refresh the Gantt Control within “ActionComplete” event, so we have logged a feature to trigger the “ActionComplete” at last after the user modification over data, then refresh the page visually. But still your requirement can be achieved by refreshing Gantt from externally like with an external custom button or with custom toolbar icon after the changes are made with datasource values.

Regards,
Mahalakshmi K.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;