Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hi,

I would like to be able to have an option to show tasks if the parentId does not exist or is not loaded.  At present, if a task has a parentId that doesn't exist i the data collection, the task will not be shown.

I am implementing task filtering logic in the base collection and am having to do work to test if a parent Id exists before rendering.


@page "/gantt1" @using Syncfusion.Blazor.Gantt

Gantt Chart

@*ProjectStartDate="@ProjectStart" ProjectEndDate="@ProjectEnd"*@
@code{ public SfGantt gantt { get; set; } public DateTime ProjectStart = new DateTime(2019, 4, 1); public DateTime ProjectEnd = new DateTime(2019, 5, 4); public DateTime EventDay1 = new DateTime(2019, 4, 17); public DateTime HolidayFrom1 = new DateTime(2019, 4, 11); public DateTime HolidayTo1 = new DateTime(2019, 4, 12); public DateTime HolidayFrom2 = new DateTime(2019, 4, 1); public DateTime HolidayTo2 = new DateTime(2019, 4, 1); public List TaskCollection { get; set; } public int DefaultUnitWidth = 33; public int TopTierCount = 1; public int BottomTierCount = 1; TimelineViewMode TopTierUnit = TimelineViewMode.Week; TimelineViewMode BottomTierUnit = TimelineViewMode.Day; string TopTierFormat = "MMM dd, yyyy"; string BottomTierFormat = ""; public string[] Searchfields = new string[] { "TaskId", "TaskName", "StartDate", "EndDate", "Duration", "Progress", "Predecessor" }; protected override void OnInitialized() { this.TaskCollection = GetTaskCollection(); } public class TaskData { public int TaskId { get; set; } public string TaskName { get; set; } public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public string Duration { get; set; } public int Progress { get; set; } public int Work { get; set; } public string Predecessor { get; set; } public int? ParentID { get; set; } } public static List GetTaskCollection() { List Tasks = new List() { new TaskData() { TaskId = 1, TaskName = "Project initiation Id=1", StartDate = new DateTime(2019, 04, 02), EndDate = new DateTime(2019, 04, 21), ParentID = null }, new TaskData() { TaskId = 2, TaskName = "Project initiation Id=2", StartDate = new DateTime(2019, 04, 02), EndDate = new DateTime(2019, 04, 21), ParentID = 1 }, new TaskData() { TaskId = 3, TaskName = "Project initiation Id=3 - TASK WILL NOT BE SHOWN", StartDate = new DateTime(2019, 04, 02), EndDate = new DateTime(2019, 04, 21), ParentID = 4 } }; return Tasks; } }