File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff 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/ )
You can’t perform that action at this time.
0 commit comments