Gantt changes dates and how to disable editing for specific cell
Hi,
Attachment: gantt_e80e0485.zip
I have two problems.
1. The Gantt control changes endDate, for example, I provided "2019-07-06T00:00:00Z", but Gantt changes it to Mon Jul 08 2019 08:00:00 GMT+0200.
2. How to disable editing for specific cell? I tried to cancel actionBegin but it didn't work.
Best regards,
Tomasz Tomczykiewicz
Attachment: gantt_e80e0485.zip
SIGN IN To post a reply.
4 Replies
PP
Pooja Priya Krishna Moorthy
Syncfusion Team
July 3, 2019 11:31 AM UTC
Hi Tomasz,
Query 1: The Gantt control changes endDate, for example, I provided "2019-07-06T00:00:00Z", but Gantt changes it to Mon Jul 08 2019 08:00:00 GMT+0200.
Response: The given end date July 6, which lies on weekend(On Saturday). Hence, it is considered as holidays. So, the start & end dates are calculated internally and render to the next week day (working day) due to includeWeekend Property is false, By default the includeWeekend is false. If we want to consider weekends then we need to use includeWeekend as true, then all the weekends are also considered as working days. Please find the code example below.
|
<ejs-gantt :data-source="data" :includeWeekend="true">
//...
</ejs-gantt> |
Query 2: How to disable editing for specific cell? I tried to cancel actionBegin but it didn't work.
Response:
Currently, we don’t have support to disable editing for specific cell. Hence we logged a feature report for this. You can track the status of the feature as below feedback link.
This feature will be included in our Volume 2, main release which is expected to be rolled out on mid of July 2019.
Regards,
Pooja Priya K.
PP
Pooja Priya Krishna Moorthy
Syncfusion Team
July 5, 2019 09:39 AM UTC
Hi Tomasz,
Sorry for the inconvenienced caused. Please ignore the previous update.
Query 2: How to disable editing for specific cell? I tried to cancel actionBegin but it didn't work.
Response:
We can disable the editing for specific cell by using cellEdit event. We can set ‘args.cancel’ to true for particular cell in order to cancel the editing action. Please find the code example below.
|
<template>
<div>
<ejs-gantt ref='gantt' :dataSource="data" id="GanttContainer" :cellEdit="cellEdit">
//...
</ejs-gantt>
</div>
</template>
<script>
//...
methods:{
cellEdit:function (args) {
if(args.columnName == 'TaskName' && args.rowData.TaskID == 2) {
args.cancel = true
}
},
}
</script> |
Please find the below sample link.
Regards,
Pooja Priya K
TT
Tomasz Tomczykiewicz
July 5, 2019 10:29 AM UTC
Thanks, this is a feature I was looking for.
Best regards,
Tomasz Tomczykiewicz
JA
Jesus Arockia Sankaran S
Syncfusion Team
July 5, 2019 11:14 AM UTC
Hi Tomasz,
Thanks for your reply.
Please get back to us if you need any further assistance.
Regards,
Jesus Arockia Sankaran S
SIGN IN To post a reply.
- 4 Replies
- 3 Participants
-
TT Tomasz Tomczykiewicz
- Jul 2, 2019 01:30 PM UTC
- Jul 5, 2019 11:14 AM UTC