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

Gantt Header Texts

Hi,
following your example of adding a custom column in the Gantt I changed the Header Text of some standard Columns Like Start Date and End Date in this way.

function Load(args) {
    var columns = this.getColumns();
    columns[0].width = "0px";
    columns[2].headerText = "Planned start date";
    columns[3].headerText = "Planned end date";
    columns.push(
    {
        field: "ActualStartDate",
        headerText: "Actual start date",
        editType: "datepicker",
        mappingName: "ActualStartDate", //Provide this mapping name
        format: "{0:dd/MM/yyyy}",
        width: "120px"
    });
    columns.push({
        field: "ActualEndDate",
        headerText: "Actual end date",
        editType: "datepicker",
        mappingName: "ActualEndDate", //Provide this mapping name,
        format: "{0:dd/MM/yyyy}",
        width: "120px"
    });
    columns.push({
        field: "Order",
        headerText: "Order",
        editType: "numericedit",
        mappingName: "Order", //Provide this mapping name,
        width: "60px"
    });
    columns.push({
        field: "IsFixedTask",
        headerText: "",
        editType: "booleanedit",
        mappingName: "IsFixedTask", 
        width: "0px"
    });
}
When I open the Add Dialog or Edit Dialog the Labels in the field corresponding to the Start Date and End Date are not changed according to the columns

An I doing soething wrong? or there are different properties to set to change those labels?

   Thanks in advance

   Andrea Perazzolo




1 Reply

JD Jayakumar Duraisamy Syncfusion Team November 2, 2015 12:46 PM UTC

Hi Andrea,

It is possible to change the default header text of the in-built columns and in Add/Edit dialog labels in Gantt , by over writing the header text values of the localized variables. Please find the below code example for more details,


<script type="text/javascript">

       

   ej.Gantt.localization['en-US'].columnHeaderTexts.startDate = "New Start Date";

   ej.Gantt.localization['en-US'].columnHeaderTexts.duration   = "Time Delay";


</script>


We have also prepared a sample based on this, you can find the sample in the below location,

Location : http://www.syncfusion.com/downloads/support/forum/120973/ze/GanttSample-2055877623
Please let us know if you require further assistance on this.
Regards,
Jayakumar Duraisamy

Loader.
Live Chat Icon For mobile
Up arrow icon