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

Disable row editing

Hello,
Is there any method on disabling editing on a specific row?
I've tryed, but this also disabled the click for expanding it's subtasks
rowDataBound: function (args) {
         if(args.data.taskID ===100)
               args.row.style['pointer-events']='none';

1 Reply

SD Saranya Dhayalan Syncfusion Team November 5, 2019 09:47 AM UTC

Hi Razvan, 
 
Thank you for contacting Syncfusion support 
 
We have checked your requirement, In Gantt, we can disable the specific row editing by using actionBegin, beginEdit, taskbarEditing events. By setting args.cancel  as true in event argument, we can disable the particular event’s action. 
 
Please find the code snippet below, 
 
  $("#GanttContainer").ejGantt({ 
           //..... 
                actionBegin: function(args) { 
                  if(args.requestType == "beforeOpenEditDialog") 
                  { 
                        if(args.data.taskId == 4) { 
                            args.cancel = true; 
                        } 
                  } 
                }, 
                beginEdit: function(args) { 
                    if(args.data.taskId == 4) { 
                        args.cancel = true; 
                    } 
                }, 
                taskbarEditing: function (args) { 
                    if(args.rowData.taskId == 4) { 
                        args.cancel = true; 
                    } 
                }, 
      
 
We can’t find whether you are using EJ1 version of or EJ2 version of Gantt, we have prepared sample for both versions. Please find the samples links below. 
 
 
 
Please share us information about whether you are using EJ1 Gantt or EJ2 Gantt, it will helpful to provide solution based on this. 
 
Could you please check the above sample and get back to us if you need any further assistance on this? 
 
Regards, 
Saranya D 


Loader.
Live Chat Icon For mobile
Up arrow icon