how to custom the dependency parameters in add/edit dialog fields

Hello,
I would like to know how to change the identification parameter in dialog field of dependency.
I have task with id 41 and when I am trying to add the new task with dependencies to the task 41 I have this image:

dep.PNG

I would like to change the value of drop down list in name like identify all tasks by their names and in place of "id-null".
Also ,I would like to know how can I make a field required in dialog fields.
Thank you for your answer.


P.S In your provided examples only the subtasks have dependencies,does it mean that only subtasks can have dependencies?If it does,can we change that?


13 Replies

SJ Sivaranjith Jeyabalan Syncfusion Team August 19, 2022 01:35 PM UTC

Hi Nurbek,

We will validate and update you with more details on 22nd August 2022.


Regards,

Sivaranjith



HO HOMD August 21, 2022 02:39 PM UTC

I was also facing the same issue and also couldn't find any solution yet, kindly lemme know if have solution. 

Keep connected Home maintenance Dubai



SJ Sivaranjith Jeyabalan Syncfusion Team August 22, 2022 03:20 PM UTC

Hi Nurbek,


Could you please confirm us which syncfusion component you are using inside the dialog box.? Also, explain us your requirements in detail with screenshot or video.


Regards,

Sivaranjith



NU Nurbek replied to Sivaranjith Jeyabalan August 29, 2022 09:14 AM UTC

Hello,
I am using Gantt component .When I am trying to create a new task and add the dependecy to the existing task in AddDialog ,I am getting the relation of dependency of this new task and existing task by {{id -name}} of existing task.
I provide the image.

syncs.PNG



What I want is to put off the id and left just a name of existing task in this dialog.Thank you for your help.



NU Nurbek replied to Sivaranjith Jeyabalan August 29, 2022 09:16 AM UTC

Hi,
Well, I resolved the problem with a null-name.I added the name attribute in taskFields,so now its id-name of existing task.I hope it would resolve your problem too.

Have a good day.



NU Nurbek replied to Nurbek August 29, 2022 09:19 AM UTC

I also would like to know how can I disallow the default title of new task.Here in place of "Nouvelle tache 51" I just want to left Nouvelle tache or nothing.
sync2.PNG



GM Gopinath Munusamy Syncfusion Team August 30, 2022 10:28 AM UTC

Hi Nurbek,


We have prepared a sample for your requirement to customize the newly added task name. In this sample, we have modified the task name using the beforeOpenAddDialog requestType inside the actionBegin event. We have attached sample and code snippets for your reference, please refer to the below sample and code snippets for more information.


Code snippet:

[App.Vue]

 

<ejs-gantt :actionBegin= "actionBegin">

 

actionBegin(args) {

             if(args.requestType == "beforeOpenAddDialog"){

                 args.rowData.TaskName = "New Task"

             }

       }



Sample: https://www.syncfusion.com/downloads/support/forum/176879/ze/Vue_Gantt-722013754.zip


Regards,

Gopinath M



NU Nurbek replied to Gopinath Munusamy September 8, 2022 08:54 AM UTC

Thanks for this answer. Could you please tell me how can I get rid of the id in the dependencies field in the add dialog?



GM Gopinath Munusamy Syncfusion Team September 9, 2022 10:35 AM UTC

Hi Nurbek,


We have prepared a sample for your requirement to remove the id from the dependency tab in the add dialog. In this sample, we have used the beforeOpenAddDialog requestType inside the actionBegin event to remove the id column from the dependency tab. Based on the requirement that the field name is id, the visible property has been changed to false. We have attached sample and code snippets for your reference, please refer to the below sample and code snippets for more information.


Code snippet:

[App.Vue]

 

<ejs-gantt :actionBegin= "actionBegin">

 

actionBegin(args) {

            if(args.requestType == "beforeOpenAddDialog"){

                args.rowData.TaskName = "New Task";

                if(args.Dependency.columns[0].field === "id"){

                    args.Dependency.columns[0].visible = false;

                }

            }

        },



Sample: https://www.syncfusion.com/downloads/support/forum/176879/ze/VueGantt-1579684374.zip


Regards,

Gopinath M



NU Nurbek replied to Gopinath Munusamy September 9, 2022 07:18 PM UTC

Thanks,but above I also mentioned the name field.How can I just show the name instead of id-name?I didn't find anything in  args.Dependency who can do that .



GM Gopinath Munusamy Syncfusion Team September 12, 2022 02:27 PM UTC

Hi Nurbek,


We are currently working on you query and we will provide you an update within two business days on September 14, 2022. Until then we appreciate your patience.


Regards,

Gopinath M



GM Gopinath Munusamy Syncfusion Team September 14, 2022 02:00 PM UTC

Hi Nurbek,

We are facing an issue while trying to achieve your requirement. We have considered this as a bug and have logged a bug report for it, and we will provide a solution once this issue has been resolved. You can track its status from the below feedback link.

Feedback: https://www.syncfusion.com/feedback/37732/issue-when-adding-customized-dependency-value-to-a-new-task

The fix will be provided in the patch release scheduled for October 05, 2022.

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.

Regards,

Gopinath M



GM Gopinath Munusamy Syncfusion Team October 6, 2022 01:20 PM UTC

Hi Nurbek,


Thank you for your patience.

The reported issue “Issue when adding customized dependency value to a new task” has been fixed in version v20.3.48. Please find the release notes from the below link.

Release Notes: https://ej2.syncfusion.com/vue/documentation/release-notes/20.3.48/?type=all#gantt.

Also, we have attached a workaround sample to achieve your requirement. In this sample we have trimmed the task id value from the dropdown list in the dependency tab. To achieve this, we have used actionComplete event with requestType of openAddDialog and openEditDialog. Please check this below sample and code snippets for more details,

Code Snippets:

[App.Vue]

actionComplete(args) {

    if (args.requestType === "openEditDialog" || args.requestType === "openAddDialog") {

      var tabObj = document.getElementById('Gantt_Tab').ej2_instances[0];

      tabObj.selected = function(args) {

        if (args.selectedIndex === 1) {

          var ganttObj = document.getElementById("GanttDependencyTabContainer");

          if (ganttObj) {

            var gantt = ganttObj.ej2_instances[0];

            gantt.actionComplete = function(args) {

              var dropDownElement = document.getElementById("GanttDependencyTabContainername");

              if (dropDownElement) {

                var dropDown = dropDownElement.ej2_instances[0];

                if (args.requestType == "add") {

                  dropDown.actionBegin = function(args) {

                    for(var i=0; i<args.data.dataSource.json.length; i++){

                    var text = args.data.dataSource.json[i].text;

                    args.data.dataSource.json[i].text = text.substr(text.indexOf('-') + 1).trim();

                    }

                  };

                }

              }

            };

          }

        }

      };

    }

  },


Sample:  https://www.syncfusion.com/downloads/support/directtrac/general/ze/Vue_dependency_Gantt1590600033.zip


Regards,

Gopinath M


Loader.
Up arrow icon