diff --git a/blazor/gantt-chart/virtualization.md b/blazor/gantt-chart/virtualization.md index e72643c04e..c9772c7b54 100644 --- a/blazor/gantt-chart/virtualization.md +++ b/blazor/gantt-chart/virtualization.md @@ -128,116 +128,6 @@ By default, the number of records rendered per page will be twice the Gantt char ```csharp @using Syncfusion.Blazor.Gantt - - - - - - - - - - - - - - - - - - - - @code { - SfGantt GanttChart { get; set; } - private DateTime ProjectStartDate = new DateTime(2000, 1, 1); - private DateTime ProjectEndDate = new DateTime(2021, 12, 31); - public int Value { get; set; } = 1000; - private List TaskCollection { get; set; } - protected override void OnInitialized() - { - this.TaskCollection = VirtualData.GetTreeVirtualData(500); - } - - public class VirtualData - { - public static List GetTreeVirtualData(int count) - { - List DataCollection = new List(); - Random rand = new Random(); - var x = 0; - int duration = 0; - DateTime startDate = new DateTime(2000, 1, 5); - DateTime endDate = new DateTime(2000, 1, 12); - string[] assignee = { "Allison Janney", "Bryan Fogel", "Richard King", "Alex Gibson" }; - string[] reporter = { "James Ivory", "Jordan Peele", "Guillermo del Toro", "Gary Oldman" }; - for (var i = 1; i <= count / 5; i++) - { - var name = rand.Next(0, 100); - TaskData Parent = new TaskData() - { - ID = ++x, - TaskName = "Task " + x, - StartDate = startDate, - EndDate = startDate.AddDays(26), - Duration = "20", - Assignee = "Mark Bridges", - Reporter = "Kobe Bryant", - Progress = rand.Next(100), - Predecessor = null - }; - DataCollection.Add(Parent); - for (var j = 1; j <= 4; j++) - { - startDate = startDate.AddDays(j == 1 ? 0 : duration + 2); - duration = 5; - DataCollection.Add(new TaskData() - { - ID = ++x, - TaskName = "Task " + x, - StartDate = startDate, - EndDate = startDate.AddDays(5), - Duration = duration.ToString(), - Assignee = assignee[j - 1], - Reporter = reporter[j - 1], - Progress = rand.Next(100), - ParentId = Parent.ID, - Predecessor = j > 1 ? (x - 1) + "FS" : "" - }); - } - } - return DataCollection; - } - } - public class TaskData - { - public int ID { get; set; } - public string TaskName { get; set; } - public DateTime StartDate { get; set; } - public DateTime EndDate { get; set; } - public string Duration { get; set; } - public string Assignee { get; set; } - public string Reporter { get; set; } - public int Progress { get; set; } - public int? ParentId { get; set; } - } -} -``` - -### Managing records count - -By default, the number of records rendered per page will be twice the Gantt chart's height. You can customize the row rendering count using the [PageSize](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_PageSize) and [OverscanCount](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_OverscanCount) properties. Here's an explanation of these properties: - -* `PageSize`: - • The `PageSize` property determines the number of rows rendered per page in the Gantt Chart. - • It allows you to control how many rows are loaded and displayed at initial rendering and also while scrolling, helping to improve performance by reducing the number of DOM elements rendered. -* `OverscanCount`: - • The `OverscanCount` property is used to render additional rows before and after the Gantt Chart's current page rows. - • During both virtual scrolling and initial rendering, extra rows are rendered to provide a buffer around the current page area. This minimizes the need for frequent rendering during scrolling, providing a smoother user experience. - -```csharp -@using Syncfusion.Blazor.Gantt -