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. Image for the cookie policy date
close icon

Gantt chart holidays and striplines localization problem

Dear Syncfusion,

I'm getting tired of the bugs in these component. 

1. Holidays array is read only, we can not instantiate a new Holiday list as suggested by documentation. The documentation has misleading information. The list is created when we instantiate the component.
2. Holidays array only adds first item on the array correctly, and the others on the first day of the gantt chart (when localization is set to "tr-TR")
3. Striplines are working correctly, but only if I change the culture of thread to en-US temporarily. Otherwise, it doesn't add the lines to corresponding dates, as stated below:

            // Only works this way
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
            this.GanttChart.StripLines.Add(new GanttStripLine() { Day = StartDate.ToString("d"), Label = "Project Start", LineStyle = "dotted", LineColor = "black", LineWidth = 2 });
            this.GanttChart.StripLines.Add(new GanttStripLine() { Day = EndDate.ToString("d"), Label = "Project End", LineStyle = "dotted", LineColor = "black", LineWidth = 2 });
            Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR");

otherwise, it doesn't work also.

Thank you.

1 Reply

JR John Rajaram Syncfusion Team February 20, 2015 10:44 AM UTC

Hi Hasan,

We deeply regret for the inconvenience caused.

Due to some technical reasons we have changed all the Collection properties in the Gantt control to readonly. But later, we have missed to update the changes in the online documentation. So we have confirmed this as bug and logged a document issue report on this. Also we have created a support incident under your account to track the status of this issue.

Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

 

We can render Holidays and striplines in Gantt control from aspx page. Now we request you to refer the following code snippets for defining “Holidays” and “Striplines” in Gantt control based on the localization. We can also change the localization of the Gantt chart, with the help of “Locale” property along with corresponding "columnHeaderTexts" and “editDialogTexts” culture fileds.

Code snippets:

In GanttSample.aspx file:

<body>

    <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"

        //...

       

        Locale="tr-TR">

        <Holidays>

                <ej:Holiday Background="yellowgreen" Day="2/25/2014" Label="yerel Tatil" />

                <ej:Holiday Background="yellowgreen" Day="2/28/2014" Label="yerel Tatil" />

                <ej:Holiday Background="yellowgreen" Day="3/04/2014" Label="yerel Tatil" />

                <ej:Holiday Background="yellowgreen" Day="3/11/2014" Label="yerel Tatil" />

            </Holidays>

            <StripLines>

                <ej:GanttStripLine Day="02/27/2014" Label="Proje Yayın" LineColor="red" LineStyle="dotted" LineWidth="5" />

                <ej:GanttStripLine Day="03/07/2014" Label="Proje Yayın" LineColor="red" LineStyle="dotted" LineWidth="5" />

                <ej:GanttStripLine Day="03/14/2014" Label="Proje Yayın" LineColor="red" LineStyle="dotted" LineWidth="5" />             

            </StripLines>

       </ej:Gantt>

        <script>

            ej.Gantt.localization["tr-TR"] = {

                //string to display with dataSource contains 0 objects

                emptyRecord: "Hiçbir kayıt görüntülemek için",

                //headerText to be displayed in gridtree

                columnHeaderTexts: {

                    taskId: "görev Kimliği",

                    taskName: "Görev ismi",

                    startDate: "başlangıç tarihi",

                    endDate: "bitiş tarihi",

                    resourceInfo: "kaynak Bilgisi",

                    duration: "süre",

                    status: "durum",

                    predecessor: "öncel",

                    baselineStartDate: "Bazal Başlangıç Tarihi",

                    baselineEndDate: "bazal Bitiş Tarihi"

                },

                //string to display in dialog

                editDialogTexts: {

                    addFormTitle: "Form Başlığı eklemek",

                    editFormTitle: "düzenlemek Form Başlığı",

                    saveButton: "düğmesine kaydetmek",

                    cancelButton: "iptal düğmesi"

                },

              

            }

    </script>

  </form>

</body>

Following screen shots displays the Holidays and Striplines in Gantt chart.

We have also prepared a sample based on your localization along with “Holidays” and “Striplines”. Please find the sample in the following location.

Sample: http://www.syncfusion.com/downloads/support/directtrac/118282/GanttTestSample-605609968.zip

Please let us know if you need more information on this.

Regards,
John. R



Loader.
Up arrow icon