function load(args) { var columns = this.getColumns(); var nameColumn = columns[1]; nameColumn.editType = "dropdownedit"; nameColumn.editParams = { fields: { text: "text", value: "value" } }; nameColumn.dropdownData = taskNameCollection; } |
.ResourceInfoMapping("Resources") .NotesMapping("Notes") .EditDialogFields(ed => { ed.Field("Resources").Add(); ed.Field("Notes").Add(); ed.Field("CustomField").Add(); }) .AddDialogFields(ed => { ed.Field("Resources").Add(); ed.Field("Notes").Add(); ed.Field("CustomField").Add(); }) |
ej.Gantt.Locale["en-US"] = { dialogTabTitleTexts: { generalTabText: "General", predecessorsTabText: "Predecessors", resourcesTabText: "Rename_Resources", notesTabText: "Rename_Notes", customFieldsTabText: "Custom Fields", } } |
[JS] function load(args) { var customColumn = { field: "CustomField", mappingName: "CustomField", headerText:"Custom Field", editType:"stringedit" }; columns.push(customColumn); } [CS] .EditDialogFields(ed => { ed.Field("CustomField").Add(); }) .AddDialogFields(ed => { ed.Field("CustomField").Add(); }) |
Hi Renu,Thanks for contacting Syncfusion support.Please find the response below.Query 1: I have list of predefined tasks. User can only select from the list in Dialog window as Task name field.Solution: We can change the edit type of taskName column by using load client side event, please find the code snippet below.
function load(args) {var columns = this.getColumns();var nameColumn = columns[1];nameColumn.editType = "dropdownedit";nameColumn.editParams = { fields: { text: "text", value: "value" } };nameColumn.dropdownData = taskNameCollection;}Using this code snippet, we can select the task name from dropdown list control.In this work around we have added static task collection in task name field.Query 2: If I add .EditDialogFields .AddDialogFields sections to my gantt, then resource and notes tabs are not visible.Solution:We can add/remove the fields in add/edit dialog window by using “AddDialogFields and “EditDialogFields” properties.To add resource and Notes tab in add/edit dialog window we need to define value for “ResourceInfoMapping” and “NotesMapping” properties.Please find the code snippet below.
.ResourceInfoMapping("Resources").NotesMapping("Notes").EditDialogFields(ed =>{ed.Field("Resources").Add();ed.Field("Notes").Add();ed.Field("CustomField").Add();}).AddDialogFields(ed =>{ed.Field("Resources").Add();ed.Field("Notes").Add();ed.Field("CustomField").Add();})Query 3: Rename tabs in add/edit dialog windowSolution: By using below code snippet we can rename the tab name in add and edit dialog window in Gantt.
ej.Gantt.Locale["en-US"] = {dialogTabTitleTexts: {generalTabText: "General",predecessorsTabText: "Predecessors",resourcesTabText: "Rename_Resources",notesTabText: "Rename_Notes",customFieldsTabText: "Custom Fields",}}In this sample we have renamed notes and resource tabs.Query 4: Notes contain only one Rich Text field, I would like to add additional fields, how can I do that.Solution: Currently there is no support to add additional fields in notes tab, but you can add custom fields in dialog by adding custom column in Gantt.We have added one custom column in “load” client side event and this field can be editable in custom fields tab of dialog window.Please find code snippet below.
[JS]function load(args) {var customColumn = { field: "CustomField", mappingName: "CustomField", headerText:"Custom Field", editType:"stringedit" };columns.push(customColumn);}[CS].EditDialogFields(ed =>{ed.Field("CustomField").Add();}).AddDialogFields(ed =>{ed.Field("CustomField").Add();})Query 5: While creating a child task from custom context menu, Can I open openAddWindow with details of the task.Solution: At present there is no support to add a new row as child from the Gantt add dialog. We have also logged a feature regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.We have also prepared work around sample for this, please find the sample in below locationSample Link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/GanttDialog-1382658136Please let me know if you need further assistance on this.Regards,Mahalakshmi K.