diff --git a/Complex-databinding/ClientApp/src/app/app.component.ts b/Complex-databinding/ClientApp/src/app/app.component.ts index 970ba18..46d0c6b 100644 --- a/Complex-databinding/ClientApp/src/app/app.component.ts +++ b/Complex-databinding/ClientApp/src/app/app.component.ts @@ -4,7 +4,7 @@ import { DataManager, Query, UrlAdaptor } from '@syncfusion/ej2-data'; @Component({ selector: 'app-root', template: ` - + @@ -21,5 +21,5 @@ export class AppComponent { url: "Home/Datasource", }); public query?: Query = new Query().expand('Tasks'); - + public pagesettings = { pageSize: 12, pageSizeMode: 'Root' }; } diff --git a/Complex-databinding/ClientApp/src/app/app.module.ts b/Complex-databinding/ClientApp/src/app/app.module.ts index dc8f694..cd02746 100644 --- a/Complex-databinding/ClientApp/src/app/app.module.ts +++ b/Complex-databinding/ClientApp/src/app/app.module.ts @@ -3,7 +3,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; import { GridModule } from '@syncfusion/ej2-angular-grids'; -import { TreeGridModule } from '@syncfusion/ej2-angular-treegrid'; +import { TreeGridModule, PageService } from '@syncfusion/ej2-angular-treegrid'; @NgModule({ declarations: [ @@ -13,7 +13,7 @@ import { TreeGridModule } from '@syncfusion/ej2-angular-treegrid'; BrowserModule, GridModule, TreeGridModule ], - providers: [], + providers: [PageService], bootstrap: [AppComponent] }) export class AppModule { } diff --git a/Complex-databinding/Controllers/HomeController.cs b/Complex-databinding/Controllers/HomeController.cs index 2a0e9ff..67de345 100644 --- a/Complex-databinding/Controllers/HomeController.cs +++ b/Complex-databinding/Controllers/HomeController.cs @@ -81,20 +81,20 @@ public static List GetTree() if (tree.Count == 0) { int root = 0; - for (var t = 1; t <= 5; t++) + for (var t = 1; t <= 25; t++) { Random ran = new Random(); root++; int rootItem = root; - tree.Add(new TreeData() { TaskID = rootItem, TaskName = "Parent task " + rootItem.ToString(), isParent = true, IsExpanded = true, ParentValue = null, Duration = ran.Next(1, 50), Tasks = new TaskDetails { Name = "Parent" } }); + tree.Add(new TreeData() { TaskID = rootItem, TaskName = "Parent task " + rootItem.ToString(), isParent = true, IsExpanded = true, ParentValue = null, Duration = ran.Next(1, 50), Tasks = new TaskDetails { Name = "Parent"+ rootItem.ToString() } }); int parent = root; int subparent = root; for (var c = 0; c < 3; c++) { root++; int childID = root; - tree.Add(new TreeData() { TaskID = childID, TaskName = "sub Child task " + childID.ToString(), ParentValue = subparent, Duration = ran.Next(1, 50), Tasks = new TaskDetails { Name = "Sub child" } }); + tree.Add(new TreeData() { TaskID = childID, TaskName = "sub Child task " + childID.ToString(), ParentValue = subparent, Duration = ran.Next(1, 50), Tasks = new TaskDetails { Name = "Sub child" + childID.ToString()} }); } } @@ -104,4 +104,4 @@ public static List GetTree() } } -} \ No newline at end of file +} diff --git a/Complex-databinding/SyncfusionAngularASPNETMVC.csproj b/Complex-databinding/SyncfusionAngularASPNETMVC.csproj index 0439ead..1597ebb 100644 --- a/Complex-databinding/SyncfusionAngularASPNETMVC.csproj +++ b/Complex-databinding/SyncfusionAngularASPNETMVC.csproj @@ -131,8 +131,7 @@ Global.asax - - + @@ -325,4 +324,4 @@ --> - \ No newline at end of file +