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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to prevent the Edit Dialog Box from showing when cell editing is enabled.

Thread ID:

Created:

Updated:

Platform:

Replies:

147380 Sep 9,2019 01:59 AM UTC Sep 10,2019 05:48 AM UTC Vue 3
loading
Tags: Gantt Chart
Adam Moroff
Asked On September 9, 2019 01:59 AM UTC

Hello
I would like to enable Cell Editing but I do not want the user to open the Edit Dialog Box when a task is double clicked on the chart side.   I want to prevent the edit dialog box from appearing.   I can prevent the dialog box from appearing by setting its Cancel property to true, however when the user tries to edit another cell an error message is thrown.  
Uncaught TypeError: Cannot read property 'isDestroyed' of undefined at Edit.resetEditProperties (edit.js?9593:731) at Edit.endEditAction (edit.js?9593:743) at Edit.saveSuccess (edit.js?9593:717) at Edit.initiateSaveAction (edit.js?9593:677) at Edit.updateEditedTask (edit.js?9593:429) at Edit.initiateUpdateAction (edit.js?9593:375) at CellEdit.updateEditedRecord (cell-edit.js?f13c:354) at CellEdit.startDateEdited (cell-edit.js?f13c:207) at CellEdit.initiateCellEdit (cell-edit.js?f13c:123) at GanttTreeGrid.treeActionComplete (tree-grid.js?c52b:217)


My code is below:

TEMPLATE
-------------
<ejs-gantt
ref="gantt"
:height="ganttHeight"
:dataSource="ganttData"
id="GanttContainer"
:taskFields="taskFields"
:toolbar="toolbar"
:editSettings="editSettings"
:selectionSettings="selectionSettings"
:splitterSettings="splitterSettings"
:timelineSettings="timelineSettings"
:columns="columns"
:toolbarClick="toolbarClick"
:rowSelecting="rowSelecting"
highlightWeekends="true"
@endEdit="endEdit"
@actionBegin="actionBegin"
@actionComplete="actionComplete"
></ejs-gantt>

SCRIPT
--------
toolbar: [
{ text: 'Add', tooltipText: 'New task', id: 'AddTask', align: 'Left' },
{
text: 'Edit',
tooltipText: 'Edit task',
id: 'EditTask',
align: 'Left'
},
{
text: 'Delete',
tooltipText: 'Delete task',
id: 'DeleteTask',
align: 'Left'
},
'Cancel',
'ExpandAll',
'CollapseAll',
'ZoomIn',
'ZoomOut',
'ZoomToFit'
],
columns: [
{
field: 'id',
headerText: 'Id',
width: '150',
clipMode: 'EllipsisWithTooltip',
isPrimaryKey: true
},
{
field: 'title',
headerText: 'Task Name',
width: '150',
clipMode: 'EllipsisWithTooltip'
},
{
field: 'startDate',
headerText: 'Start Date',
width: '150',
format: { format: 'dd/MM/yyyy', type: 'date' }
},
{
field: 'duedate',
headerText: 'Due Date',
width: '150',
format: { format: 'dd/MM/yyyy', type: 'date' }
},
{ field: 'progress', headerText: 'Progress', width: '150' },
{ field: 'predecessor', headerText: 'Predecessor', width: '150' }
],
editSettings: {
allowAdding: false,
allowEditing: true,
allowDeleting: false,
allowTaskbarEditing: false,
showDeleteConfirmDialog: false,
mode: 'Auto'
},
timelineSettings: {
timelineUnitSize: 60,
topTier: {
format: 'dd MMM yyyy',
unit: 'Week'
},
bottomTier: {
unit: 'Day',
format: 'dd'
}
},
selectionSettings: {
mode: 'Row'
},
splitterSettings: {
columnIndex: 4
},
taskFields: {
id: 'id',
name: 'title',
startDate: 'startDate',
endDate: 'duedate',
progress: 'progress',
dependency: 'predecessor',
child: 'subtasks'
}

endEdit(args) {
console.log('end Edit fired')
console.log(args)
},
actionBegin(args) {
console.log('actionBegin fired')
console.log(args)
if (args.requestType === 'beforeOpenEditDialog') {
console.log('closing dialog')
args.cancel = true
}
},
actionComplete(args) {
console.log('actionComplete fired')
console.log(args)
},
toolbarClick(args) {
console.log('toolbar clicked')
console.log(args)
},
rowSelecting(args) {
console.log('Row selecting clicked')
console.log(args)
}




When the user double clicks on a task the dialog box is cancelled in the actionBegin method. The issue is when the user tries to edit another cell after the dialog box is cancelled the following error message is displayed.

Uncaught TypeError: Cannot read property 'isDestroyed' of undefined at Edit.resetEditProperties (edit.js?9593:731) at Edit.endEditAction (edit.js?9593:743) at Edit.saveSuccess (edit.js?9593:717) at Edit.initiateSaveAction (edit.js?9593:677) at Edit.updateEditedTask (edit.js?9593:429) at Edit.initiateUpdateAction (edit.js?9593:375) at CellEdit.updateEditedRecord (cell-edit.js?f13c:354) at CellEdit.startDateEdited (cell-edit.js?f13c:207) at CellEdit.initiateCellEdit (cell-edit.js?f13c:123) at GanttTreeGrid.treeActionComplete (tree-grid.js?c52b:217)



Gurunathan A [Syncfusion]
Replied On September 9, 2019 01:19 PM UTC

Hi Adam, 
Sorry for the inconveniences. 
We are able to reproduce the reported issue. We logged a bug report for this, you can track the status from below feedback link. 
We will fix this issue and include the fix in our Volume 3, 2019 release which is expected to be rolled out on September 30, 2019. 
Until then we appreciate your patience. 
Regards, 
Gurunathan  


Adam Moroff
Replied On September 9, 2019 09:25 PM UTC

Thank you Gurunathan. I appreciated the quick response.  

Gurunathan A [Syncfusion]
Replied On September 10, 2019 05:48 AM UTC

Hi Adam, 
  
You are welcome. 
  
Regards, 
Gurunathan 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon