I am running into an odd error with the Radzen Gantt Chart where when I dispose my component or make an edit to a task in the gantt chart, when the rendering reoccurs to account for the modification, the blazor.server.js throws an "Object Not Referenced" error.
I am running .Net 6 with Radzen.Blazor version 4.31.4
Below is the declaration for my gantt chart..
<TelerikGantt @ref="@gantt" Data="@job.JobTasks.Where(r => r.Billable).OrderBy(r => r.SortOrder)" @bind-View="@SelectedView" ColumnResizable="true" TreeListWidth="50%"
Width="100%" Navigable="true" Height="800px" IdField="JobTaskId" ParentIdField="ParentTaskID" FilterMode="@GanttFilterMode.FilterMenu" FilterMenuType="@FilterMenuType.CheckBoxList"
Sortable="true" TreeListEditMode="GanttTreeListEditMode.None" Class="no-timeline-edit" OnEdit="@OnEdit"
PercentCompleteField="ToDatePercentComplete">
<GanttViews>
<GanttDayView></GanttDayView>
<GanttWeekView></GanttWeekView>
<GanttMonthView></GanttMonthView>
<GanttYearView></GanttYearView>
</GanttViews>
<TaskTemplate>
<div class="task-assignee">@Math.Round(context.ToDatePercentComplete, 2)%</div>
</TaskTemplate>
<GanttColumns>
<GanttColumn Width="45px">
<Template>
@{
var x = context as PTS_JobTasks;
<RadzenIcon Icon="edit" Style="color:red; height: 7px;" @onclick="@(args => EditTask(x))" />
}
</Template>
</GanttColumn>
<GanttColumn Field="JobTaskId" Visible="false" />
<GanttColumn Title="#" Width="60px" Field="SortOrder">
<Template>
@{
PTS_JobTasks t = context as PTS_JobTasks;
<span style="white-space:normal" class="ui-cell-data">@t.TaskNumString</span>
}
</Template>
</GanttColumn>
<GanttColumn Expandable="true" Width="200px" Title="Task Title" Editable="false" Field="JobTask_Name" />
<GanttColumn Width="100px" Editable="false" Field="HeadCountString">
<HeaderTemplate>
<span>
Head<br />
Count
</span>
</HeaderTemplate>
</GanttColumn>
<GanttColumn Field="LaborHoursString" Width="100px" Editable="false">
<HeaderTemplate>
<span>
Labor<br />
Hours
</span>
</HeaderTemplate>
</GanttColumn>
<GanttColumn Field="EstTotalProdDays" Title="Exp. Days" Width="100px" Editable="false" />
<GanttColumn Field="Start" Width="100px" DisplayFormat="{0:d}" Editable="false" />
<GanttColumn Field="End" Width="100px" DisplayFormat="{0:d}" Editable="false" />
</GanttColumns>
<TooltipTemplate>
</TooltipTemplate>
</TelerikGantt>
I have debugged my list and I have validated that the IdField, ParentIdField, and PercentCompleteField are all populated and not null.. Not sure what else could be throwing this error..
Appreciate any help and guidance!!