We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Hierarchical display of tasks

Hello,


I am working on a Gantt blazor implementation and my task ID is a Guid. I have orders which can contain tasks so the order is the parent and the related tasks are the children. I display the task id in the gantt control on the left side. The gantt control displays the orders and tasks in a tree list (order is parent). 


Now i don't want to display the task id (guid) to the user so I made the Task Id invisible. If I do that, the gantt control doesn't show the tasks hierarchical anymore. 


Is there a way that i am not showing the task id and still having the hierarchical tree list presentation?


Thx


1 Reply

RB Rajesh Babu Syncfusion Team May 3, 2023 01:24 PM UTC

Hi Arjan,

Thanks for contacting syncfusion forum.

We have been able to reproduce the issue that you reported regarding the Gantt chart. The default TreeColumnIndex value in the Gantt chart is 0, which causes the first column to be hidden. If you wish to display the hierarchy structure for the tree list, you can modify the TreeColumnIndex value based on your requirements. Please refer to the following code sample for reference

<SfGantt DataSource="@TaskCollection" Height="450px" Width="700px" TreeColumnIndex="1">

    <GanttTaskFields Id="TaskId" Name="TaskName" StartDate="StartDate" EndDate="EndDate" Duration="Duration" Progress="Progress" ParentID="ParentId">

    </GanttTaskFields>

    <GanttColumns>

        <GanttColumn Field="TaskId" Visible="false"></GanttColumn>

        <GanttColumn Field="TaskName"></GanttColumn>

    </GanttColumns>

</SfGantt>


Documentation link : https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_TreeColumnIndex


If we misunderstood your query or your requirement is different from the above share details to proceed further.


Loader.
Up arrow icon