diff --git a/ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/data-binding/remote-data.md b/ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/data-binding/remote-data.md index c83345abd5..de23b32fe2 100644 --- a/ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/data-binding/remote-data.md +++ b/ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/data-binding/remote-data.md @@ -50,7 +50,65 @@ N>Remote Data Binding supports only Self-Referential Data and by default the `pa {% endtabs %} {% endif %} - +**Service code snippet:** + +```ts + +namespace Controllers +{ + [Produces("application/json")] + [Route("api/SelfReferenceData")] + public class SelfReferenceDataController : Controller + { + public static List tree = new List(); + // GET: api/SelfReferenceData + [HttpGet] + + public object Get() + { + var queryString = Request.Query; + if (tree.Count == 0) + tree = SelfReferenceData.GetTree(); + //Filtering + if (queryString.Keys.Contains("$filter") && !queryString.Keys.Contains("$top")) + { + StringValues filter; + queryString.TryGetValue("$filter", out filter); + int fltr = Int32.Parse(filter[0].ToString().Split("eq")[1]); + IQueryable data1 = tree.Where(f => f.ParentItem == fltr).AsQueryable(); + return new { result = data1.ToList(), count = data1.Count() }; + } + List data = tree.ToList(); + if (queryString.Keys.Contains("$select")) + { + data = (from ord in tree + select new SelfReferenceData + { + ParentItem = ord.ParentItem + } + ).ToList(); + return data; + } + data = data.Where(p => p.ParentItem == null).ToList(); + int count = data.Count; + //Paging + if (queryString.Keys.Contains("$inlinecount")) + { + StringValues Skip; + StringValues Take; + + int skip = (queryString.TryGetValue("$skip", out Skip)) ? Convert.ToInt32(Skip[0]) : 0; + int top = (queryString.TryGetValue("$top", out Take)) ? Convert.ToInt32(Take[0]) : data.Count(); + + return new { result = tree.Skip(skip).Take(top), count = tree.Count }; + } + else + { + return SelfReferenceData.GetTree(); + } + } + +``` N> By default, **DataManager** uses **ODataAdaptor** for remote data-binding.
Based on the RESTful web services, set the corresponding adaptor to DataManager. Refer [`here`](https://ej2.syncfusion.com/documentation/data/adaptors/?no-cache=1) for more details. diff --git a/ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/getting-started-mvc.md b/ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/getting-started-mvc.md index dccec0c57f..06bcd4a044 100644 --- a/ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/getting-started-mvc.md +++ b/ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/getting-started-mvc.md @@ -190,4 +190,12 @@ By default, filtered records are shown along with its parent records. This behav N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-MVC-Getting-Started-Examples/tree/main/TreeGrid/ASP.NET%20MVC%20Razor%20Examples). -N> You can refer to our [ASP.NET MVC Tree Grid](https://www.syncfusion.com/aspnet-mvc-ui-controls/tree-grid) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET MVC Tree Grid example](https://ej2.syncfusion.com/aspnetmvc/TreeGrid/Overview#/material) to knows how to present and manipulate data. \ No newline at end of file +N> You can refer to our [ASP.NET MVC Tree Grid](https://www.syncfusion.com/aspnet-mvc-ui-controls/tree-grid) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET MVC Tree Grid example](https://ej2.syncfusion.com/aspnetmvc/TreeGrid/Overview#/material) to knows how to present and manipulate data. + +* [Getting Started with Syncfusion JavaScript documentation](https://ej2.syncfusion.com/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion JavaScript (ES5) documentation](https://ej2.syncfusion.com/javascript/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion Angular documentation](https://ej2.syncfusion.com/angular/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion React documentation](https://ej2.syncfusion.com/react/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion ASP.NET Core documentation](https://ej2.syncfusion.com/aspnetcore/documentation/tree-grid/getting-started-core) +* [Getting Started with Syncfusion Vue documentation](https://ej2.syncfusion.com/vue/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion Blazor documentation](https://blazor.syncfusion.com/documentation/treegrid/getting-started-webapp) \ No newline at end of file diff --git a/ej2-asp-core-mvc/tree-grid/EJ2_ASP.NETCORE/data-binding/remote-data.md b/ej2-asp-core-mvc/tree-grid/EJ2_ASP.NETCORE/data-binding/remote-data.md index 134beac3ac..c6fb5c5b4d 100644 --- a/ej2-asp-core-mvc/tree-grid/EJ2_ASP.NETCORE/data-binding/remote-data.md +++ b/ej2-asp-core-mvc/tree-grid/EJ2_ASP.NETCORE/data-binding/remote-data.md @@ -50,6 +50,65 @@ N>Remote Data Binding supports only Self-Referential Data and by default the `pa {% endif %} +**Service code snippet:** + +```ts + +namespace Controllers +{ + [Produces("application/json")] + [Route("api/SelfReferenceData")] + public class SelfReferenceDataController : Controller + { + public static List tree = new List(); + // GET: api/SelfReferenceData + [HttpGet] + + public object Get() + { + var queryString = Request.Query; + if (tree.Count == 0) + tree = SelfReferenceData.GetTree(); + //Filtering + if (queryString.Keys.Contains("$filter") && !queryString.Keys.Contains("$top")) + { + StringValues filter; + queryString.TryGetValue("$filter", out filter); + int fltr = Int32.Parse(filter[0].ToString().Split("eq")[1]); + IQueryable data1 = tree.Where(f => f.ParentItem == fltr).AsQueryable(); + return new { result = data1.ToList(), count = data1.Count() }; + } + List data = tree.ToList(); + if (queryString.Keys.Contains("$select")) + { + data = (from ord in tree + select new SelfReferenceData + { + ParentItem = ord.ParentItem + } + ).ToList(); + return data; + } + data = data.Where(p => p.ParentItem == null).ToList(); + int count = data.Count; + //Paging + if (queryString.Keys.Contains("$inlinecount")) + { + StringValues Skip; + StringValues Take; + + int skip = (queryString.TryGetValue("$skip", out Skip)) ? Convert.ToInt32(Skip[0]) : 0; + int top = (queryString.TryGetValue("$top", out Take)) ? Convert.ToInt32(Take[0]) : data.Count(); + + return new { result = tree.Skip(skip).Take(top), count = tree.Count }; + } + else + { + return SelfReferenceData.GetTree(); + } + } + +``` N> By default, **DataManager** uses **ODataAdaptor** for remote data-binding.
Based on the RESTful web services, set the corresponding adaptor to DataManager. Refer [`here`](https://ej2.syncfusion.com/documentation/data/adaptors/?no-cache=1) for more details. diff --git a/ej2-asp-core-mvc/tree-grid/EJ2_ASP.NETCORE/getting-started-core.md b/ej2-asp-core-mvc/tree-grid/EJ2_ASP.NETCORE/getting-started-core.md index 982d5e8ecf..bacc1c34c3 100644 --- a/ej2-asp-core-mvc/tree-grid/EJ2_ASP.NETCORE/getting-started-core.md +++ b/ej2-asp-core-mvc/tree-grid/EJ2_ASP.NETCORE/getting-started-core.md @@ -615,4 +615,12 @@ N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-Ge ## See also * [Getting Started with Syncfusion ASP.NET Core using Razor Pages](https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/razor-pages/) -* [Getting Started with Syncfusion ASP.NET Core MVC using Tag Helper](https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/aspnet-core-mvc-taghelper) \ No newline at end of file +* [Getting Started with Syncfusion ASP.NET Core MVC using Tag Helper](https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/aspnet-core-mvc-taghelper) + +* [Getting Started with Syncfusion JavaScript documentation](https://ej2.syncfusion.com/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion JavaScript (ES5) documentation](https://ej2.syncfusion.com/javascript/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion Angular documentation](https://ej2.syncfusion.com/angular/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion React documentation](https://ej2.syncfusion.com/react/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion ASP.NET Core documentation](https://ej2.syncfusion.com/aspnetcore/documentation/tree-grid/getting-started-core) +* [Getting Started with Syncfusion Vue documentation](https://ej2.syncfusion.com/vue/documentation/treegrid/getting-started) +* [Getting Started with Syncfusion Blazor documentation](https://blazor.syncfusion.com/documentation/treegrid/getting-started-webapp) \ No newline at end of file diff --git a/ej2-asp-core-mvc/tree-grid/overview.md b/ej2-asp-core-mvc/tree-grid/overview.md index c2cfa49fa3..92aa2b56e0 100644 --- a/ej2-asp-core-mvc/tree-grid/overview.md +++ b/ej2-asp-core-mvc/tree-grid/overview.md @@ -1,6 +1,6 @@ --- layout: post -title: Overview in ##Platform_Name## Tree Grid Component +title: Overview in ##Platform_Name## Tree Grid Component | Syncfusion description: Learn here all about Overview in Syncfusion ##Platform_Name## Tree Grid component of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Index @@ -9,7 +9,7 @@ documentation: ug --- -# Overview +# Overview in ##Platform_Name## Tree Grid Component The TreeGrid component is a feature-rich control used to visualize self-referential hierarchical data effectively in a tabular format. It can pull data from data sources such as an array of JSON, RESTful services, `OData services`, `WCF services` or `DataManager`, and binding data fields to columns. It also expands or collapses child data using the tree column. @@ -18,10 +18,12 @@ The most important features available in the TreeGrid component are paging, sort ## Key features * **Data sources**: Binds the TreeGrid component with an array of JavaScript objects or DataManager. +* **Adaptive Layout**: The Tree Grid user interface (UI) has been redesigned to provide an optimal viewing experience and improve usability on small screens. * **Sorting**: Supports **n** levels of sorting. * **Filtering**: Supports filtering records with filter bar and menu filtering modes. * **Paging**: Allows easy switching between pages using the pager bar. * **Editing**: Offers cell and row editing modes for updating the records. +* **Virtual scrolling**: To efficiently handle and display a large amount of data without experiencing any performance degradation. * **Columns**: The column definitions are used as the datasource schema in the TreeGrid. This plays a vital role in rendering column values in the required tree structure. * **Reordering**: Allows dragging and dropping of any column anywhere in the treegrid’s column header row, thus allowing repositioning of columns. * **Resizing**: Resizing allows changing column width on the fly by simply dragging the right corner of the column header. diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index 8ea568b94a..62dabc1263 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -1387,7 +1387,6 @@
  • Hide sorting options on Excel filter Dialog
  • Add a title to the header when using Grid print function
  • Customizing Filter Dialog by using an additional Parameter
  • -
  • Customize the empty record template
  • @@ -2755,7 +2754,7 @@
  • -
  • Tree Grid +
  • Tree Grid
  • @@ -2717,7 +2716,7 @@
  • -
  • Tree Grid +
  • Tree Grid