Make Uneditable The Dependency Tab

Hello,

I am building a Gantt chart that shows dependencies between tasks. Since the chart may contain a high number of tasks, reading the dependencies may become complicated, as the arrows often overlap.

For this reason, I would like to use the Dependency tab of the edit dialog to show the dependencies. The problem is that by doing this, I'm also allowing the user to edit the data regarding the dependencies, which is something I want to prevent.

Is there any way to make the Dependency tab of the edit dialog uneditable? Is it also possible to resize the columns of the same tab? (the Id column is way too small to show the IDs I'm using)

Thank you.


1 Reply

SJ Sridharan Jayabalan Syncfusion Team May 30, 2024 10:56 AM UTC

Hi Riccardo,

 

Greetings from Syncfusion.

 

Query 1 - to make the Dependency tab of the edit dialog uneditable

 

For this query, we suggest you set the allowEditing propety 'false' in the predecessor column field. Refer code snippet for more information.

 

Code-Snippet: -

  columns: [

    { field: 'Predecessor', allowEditing: false },

  ],

 

 

Query 2 - to resize the columns of the same tab? (the Id column is way too small to show the IDs I'm using)

 

To resize the ID column in the dependency tab, we suggest to use actionBegin event to achieve your requirement. Inside the event, you can modify the column's width. Refer the code snippet for more information.

 

Code-Snippet:   

actionBegin(args) {

    if (

      args.requestType == 'beforeOpenEditDialog' ||

      args.requestType == 'beforeOpenAddDialog'

    ) {

      args.Dependency.columns[0].width = '200px';

    }

  },

 

Cumulative Sample - Scmddx (forked) - StackBlitz

 

 Image_3241_1717066805235

 

 

Regards,

Sridharan


Loader.
Up arrow icon