fix my task in Gantt


hello, 

Sorry, but I have a problem,
with this program :

<ej-gantt id="modelisation" datasource="ViewBag.modelisation" 
                              task-id-mapping="Id"
                              task-name-mapping="Libelle"
                              start-date-mapping="Start"
                              duration-mapping="duration"
                              schedule-start-date="05/20/2018"
                              schedule-end-date="10/10/2018">
                        <e-schedule-header-settings schedule-header-type="Month" week-start-day=2
                                                    week-header-format="M/dd" month-header-format="MMM yyyy"
                                                    timescale-start-date-mode="Month" />
                    </ej-gantt>


How can I disable the function which permits to modify the task


I just need to display the data.

3 Replies

PE Punniyamoorthi Elangovan Syncfusion Team June 21, 2018 11:57 AM UTC

Hi TheDarkBoz, 
Thank you for contacting Syncfusion support 
We have analyzed your requirement. In Gantt we can disable the Gantt chart editing by setting the allowGanttChartEditing property as false. Please refer the below code snippet 
[CSHTML] 
<ej-gantt id="ganttSample" 
    task-id-mapping="Id" 
    task-name-mapping="Name" 
    allow-gantt-chart-editing="false" 
    //.. 
  > 
</ej-gantt> 
We have prepared the sample for your reference please find the sample link below 
Please let us know if you require further assistance on this  
Regards,  
Punniyamoorthi.  



TH TheDarkBoz June 26, 2018 12:17 PM UTC

thank you,

Can you tell me how to "collapse all" by default?


And I want to change localization to "fr-FR" but I don't understand how it works?




PE Punniyamoorthi Elangovan Syncfusion Team June 27, 2018 12:33 PM UTC

Hi TheDarkBoz,  
Please find the below update 
Query1: Can you tell me how to "collapse all" by default? 
Answer: In Gantt we can render all the rows in collapsed state by using enableCollapseAll property. 
Please refer the below code snippet. 
[CSHTML] 
<ej-gantt id="ganttSample" datasource="ViewBag.datasource" 
       task-id-mapping="Id" 
       task-name-mapping="Name"    
       enable-collapse-all="true" 
       //.. 
        > 
</ej-gantt> 
Please refer the following knowledge base article for this.  
We have prepared the sample for your reference, please find the sample link below 
 
Query2: And I want to change localization to "fr-FR" but I don't understand how it works? 
Answer:  
The culture of the Gantt control can be defined by using locale property. 
In Gantt we can customize the User Interface (UI) based on a culture, specific to a country or region, in order to display regional data. For localization we need to refer the below script file in the reference section. The following script file is used to localize the date Time object based upon the culture.  
<head> 
<script src="scripts/ej.culture.fr-FR.min.js"></script> 
</head> 
In Gantt there is also supporting to customize the all the text in Gantt control by referring the following script file in the reference section 
<head> 
<script src="scripts/ej.localetexts.fr-FR.min.js"></script> 
</head> 
In the above source file we had replace the default text of the Gantt UI based on the culture. 
In Gantt we can also customize the localized text by define them locally in the sample, by using this support the user can set the localization text to the Gantt control based upon his requirement. Please refer the below code snippet. 
ej.Gantt.Locale["fr-FR"] = { 
 
           //headerText to be displayed in TreeGrid 
 
           columnHeaderTexts: { 
 
               taskId: "Tâche Ia" 
 
               taskName: "Tâche Tâche", 
 
               startDate: "Démarrer Date", 
 
               endDate: "Fin Date", 
 
               resourceInfo: "Resources", 
 
               duration: "Durée", 
 
               status: "Progrès", 
 
               predecessor: "Prédécesseur", 
 
               baselineStartDate: "Baseline Démarrer Date", 
 
               baselineEndDate: "Baseline Fin Date" 
 
           }, 
 
           //string to display in dialog  
 
           editDialogTexts: { 
 
               addFormTitle: "Nouveau Tâche", 
 
               editFormTitle: "Modifier Tâche", 
 
               saveButton: "Sauver", 
 
               cancelButton: "Annuler" 
 
           }, 
 
       } 
We have attached our sample browser sample link for your reference, please find the sample link below 
Please find more details about the localization support is here. 
We have prepared the sample, in this sample we had set the localization for “fr-FR” culture please find the sample link below 
Regards, 
Punniyamoorthi 
 


Loader.
Up arrow icon