Skip to content

Commit 86616aa

Browse files
authored
docs(gantt): Fix breaking ObservableCollection example
1 parent 3a461d5 commit 86616aa

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

components/gantt/refresh-data.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,11 @@ In this article:
239239
240240
private GanttView SelectedView { get; set; } = GanttView.Week;
241241
242-
243-
void AddRootTask()
242+
private void AddRootTask()
244243
{
245-
var i = GanttData.Last().Id + 1;
246-
247244
GanttData.Insert(0,new FlatModel()
248245
{
249-
Id = i,
246+
Id = ++LastId,
250247
ParentId = null,
251248
Title = "new task",
252249
PercentComplete = 0,
@@ -522,4 +519,4 @@ In this article:
522519

523520
* [ObservableCollection]({%slug common-features-observable-data%})
524521
* [INotifyCollectionChanged Interface](https://docs.microsoft.com/en-us/dotnet/api/system.collections.specialized.inotifycollectionchanged?view=netframework-4.8)
525-
* [Live Demos](https://demos.telerik.com/blazor-ui/)
522+
* [Live Demos](https://demos.telerik.com/blazor-ui/)

0 commit comments

Comments
 (0)