Gant Task Items with Drop Downs

Is there a way to show drop downs in a gantt row edit?  Or is there a way to customize the task row edit?


1 Reply

AG Ajithkumar Gopalakrishnan Syncfusion Team March 21, 2024 11:32 AM UTC

Hi Sam,

Greetings from Syncfusion Support,

To achieve your requirement, we suggest to use the EditTemplate feature in the Gantt chart. This EditTemplate property is used for rendering any custom component on performing Editing with cell and dialog edit. We have attached a code snippet and sample for reference.

Ug link: https://blazor.syncfusion.com/documentation/gantt-chart/managing-tasks#cell-edit-template

Also Customize through EditorSettings based on EditType which has been discussed below

https://blazor.syncfusion.com/documentation/gantt-chart/managing-tasks#cell-edit-type-and-its-params


<SfGantt DataSource="@TaskCollection" >

     …

    <GanttColumns>

         …

        <GanttColumn Field="Status" HeaderText="Status">

             <EditTemplate>

                 @{

                    var task = (context as TaskData);

                }

                <SfDropDownList ID="Status" @bind-Value="task.Status" TItem="string" TValue="string" DataSource="@DropDownData"></SfDropDownList>

            </EditTemplate>

        </GanttColumn>

    </GanttColumns>

</SfGantt>


Sample link : https://blazorplayground.syncfusion.com/embed/hjVzDqhWrdVEcoaw?appbar=true&editor=true&result=true&errorlist=false&theme=bootstrap5

If we misunderstood your query, share us detailed Explanation, Screenshot/Video Demo to proceed further.


Regards,

Ajithkumar G


Loader.
Up arrow icon