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:
239
239
240
240
private GanttView SelectedView { get; set; } = GanttView.Week;
241
241
242
-
243
- void AddRootTask()
242
+ private void AddRootTask()
244
243
{
245
- var i = GanttData.Last().Id + 1;
246
-
247
244
GanttData.Insert(0,new FlatModel()
248
245
{
249
- Id = i ,
246
+ Id = ++LastId ,
250
247
ParentId = null,
251
248
Title = "new task",
252
249
PercentComplete = 0,
@@ -522,4 +519,4 @@ In this article:
522
519
523
520
* [ ObservableCollection] ({%slug common-features-observable-data%})
524
521
* [ 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