|
<SfGantt TValue="TaskData" ID="Gantt" )">
//...
<GanttAddDialogFields>
<GanttAddDialogField Type="DialogFieldType.General" Fields="@(new string[] { "TaskId" ,"TaskName"})"></GanttAddDialogField>
</GanttAddDialogFields>
<GanttEditDialogFields>
<GanttEditDialogField Type="DialogFieldType.General" Fields="@(new string[] { "TaskId" ,"TaskName"})"></GanttEditDialogField>
</GanttEditDialogFields>
</SfGantt>
|
Does anyone know how to add a drop down to the add/edit dialogs? I would like my users to have a list of predefined tasks to choose from when adding a new task.
I would also like to automatically set the parentID. I imagine i can do this by checking the parent of the rowselected and passing it as a parameter, but how?
Thanks
John
Hi John,
Please find the response for your queries below.
|
Sl.No.
|
Query |
Syncfusion Comments |
|
|
1 |
How do I add a drop down to the add/edit dialogs? I need to limit my users to a list of predefined values to choose from when adding a new task. |
We have support for edit template in the Blazor Gantt Chart. We can use this support to render a drop down list in the Ad/Edit dialog. The below code snippets demonstrate the solution.
Index.razor
Online Documentation: https://blazor.syncfusion.com/documentation/gantt-chart/managing-tasks#cell-edit-template
|
|
|
2 |
I would also like to automatically set the parentID. I imagine i can do this by checking the parent of the rowselected and passing it as a parameter, but how? |
We can use the NewRowPosition property to automatically set the parentId of the new record. If we can set that property to Child, then the newly added record will be added as the child of the selected record.
Index.razor
|
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/418309423954971
Regards,
Monisha.