From d063a2954bb0b31182eabade5f3198dacbbcd7e7 Mon Sep 17 00:00:00 2001 From: Saravanan-sf4375 <154953221+Saravanan-sf4375@users.noreply.github.com> Date: Tue, 20 May 2025 18:00:18 +0530 Subject: [PATCH 1/3] 911643: Added ug documentation for Treeview component --- .../navigate-url-node-cs1/node-url-core.cs | 52 ++++++++++++++++++ .../navigate-url-node-cs1/node-url-mvc.cs | 54 +++++++++++++++++++ .../how-to/navigate-url-node-cs1/razor | 3 ++ .../how-to/navigate-url-node-cs1/tagHelper | 3 ++ .../treeview/how-to/assign-url-to-node.md | 38 +++++++++++++ ej2-asp-core-toc.html | 1 + ej2-asp-mvc-toc.html | 1 + 7 files changed, 152 insertions(+) create mode 100644 ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-core.cs create mode 100644 ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-mvc.cs create mode 100644 ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/razor create mode 100644 ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/tagHelper create mode 100644 ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md diff --git a/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-core.cs b/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-core.cs new file mode 100644 index 0000000000..b3c161cbad --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-core.cs @@ -0,0 +1,52 @@ +public IActionResult CheckBox() + { + List treedata = new List(); + treedata.Add(new + { + Id = 1, + Name = "Vue", + HasChild = true, + Expanded = true, + NavigateUrl: 'https://ej2.syncfusion.com/vue/documentation/treeview/getting-started' + }); + treedata.Add(new + { + Id = 2, + Pid = 1, + Name = "JavaScript", + NavigateUrl: 'https://ej2.syncfusion.com/javascript/documentation/treeview/es5-getting-started' + + }); + treedata.Add(new + { + Id = 3, + Pid = 1, + Name = "ASP.NET Core", + NavigateUrl: 'https://ej2.syncfusion.com/aspnetcore/documentation/treeview/getting-started', + }); + + treedata.Add(new + { + Id = 4, + Name: 'Angular', + HasChild: true, + NavigateUrl: 'https://ej2.syncfusion.com/angular/documentation/treeview/getting-started', + }); + treedata.Add(new + { + Id: 5, + Pid: 4, + Name: 'Blazor', + NavigateUrl: 'https://blazor.syncfusion.com/documentation/treeview/getting-started-webapp', + + }); + treedata.Add(new + { + Id: 6, + Pid: 4, + Name: 'React', + NavigateUrl:'https://ej2.syncfusion.com/react/documentation/treeview/getting-started', + }); + ViewBag.dataSource = treedata; + return View(); + } diff --git a/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-mvc.cs b/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-mvc.cs new file mode 100644 index 0000000000..175e507000 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-mvc.cs @@ -0,0 +1,54 @@ +using Syncfusion.EJ2.Navigations; + +public ActionResult CheckBox() +{ + List treedata = new List(); + treedata.Add(new + { + Id = 1, + Name = "Vue", + HasChild = true, + Expanded = true, + NavigateUrl: 'https://ej2.syncfusion.com/vue/documentation/treeview/getting-started' + }); + treedata.Add(new + { + Id = 2, + Pid = 1, + Name = "JavaScript", + NavigateUrl: 'https://ej2.syncfusion.com/javascript/documentation/treeview/es5-getting-started' + + }); + treedata.Add(new + { + Id = 3, + Pid = 1, + Name = "ASP.NET Core", + NavigateUrl: 'https://ej2.syncfusion.com/aspnetcore/documentation/treeview/getting-started', + }); + + treedata.Add(new + { + Id = 4, + Name: 'Angular', + HasChild: true, + NavigateUrl: 'https://ej2.syncfusion.com/angular/documentation/treeview/getting-started', + }); + treedata.Add(new + { + Id: 5, + Pid: 4, + Name: 'Blazor', + NavigateUrl: 'https://blazor.syncfusion.com/documentation/treeview/getting-started-webapp', + + }); + treedata.Add(new + { + Id: 6, + Pid: 4, + Name: 'React', + NavigateUrl:'https://ej2.syncfusion.com/react/documentation/treeview/getting-started', + }); + ViewBag.dataSource = treedata; + return View(); +} diff --git a/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/razor b/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/razor new file mode 100644 index 0000000000..e36b18b275 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/razor @@ -0,0 +1,3 @@ +@Html.EJS().TreeView("treedata").Fields(field=> + field.Id("Id").ParentID("Pid").Text("Name").HasChildren("HasChild").Expanded("Expanded").NavigateUrl("NavigateUrl") + .DataSource(ViewBag.dataSource)).Render() \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/tagHelper b/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/tagHelper new file mode 100644 index 0000000000..4f634931eb --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/treeview/how-to/navigate-url-node-cs1/tagHelper @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md b/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md new file mode 100644 index 0000000000..1a8a9b824a --- /dev/null +++ b/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md @@ -0,0 +1,38 @@ +--- +layout: post +title: Assign URLs to specific nodes in ##Platform_Name## TreeView component | Syncfusion +description: Learn here all about Assign URLs to specific nodes in Syncfusion ##Platform_Name## TreeView component of Syncfusion Essential JS 2 and more. +platform: ej2-vue +control: ej2-asp-core-mvc +documentation: ug +domainurl: ##DomainURL## +--- + +# Assign URLs to specific nodes in Vue TreeView component + +{% if page.publishingplatform == "aspnet-core" %} + +You can able to assign url to the nodes of TreeView by using [NavigateUrl](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Navigations.TreeViewFieldsSettings.html#Syncfusion_EJ2_Navigations_TreeViewFieldsSettings_NavigateUrl) in field property. + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/treeview/how-to/navigate-url-node-cs1/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Nodecheck.cs" %} +{% include code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-core.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +You can able to assign url to the nodes of TreeView by using [NavigateUrl](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Navigations.TreeViewFieldsSettings.html#Syncfusion_EJ2_Navigations_TreeViewFieldsSettings_NavigateUrl) in field property. + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/treeview/how-to/navigate-url-node-cs1/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Nodecheck.cs" %} +{% include code-snippet/treeview/how-to/navigate-url-node-cs1/node-url-mvc.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index 49407f2dd7..2455f2925c 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -3112,6 +3112,7 @@
  • Customize The Tree Nodes Based On Levels
  • Restrict The Drag-and-Drop For Particular Tree Nodes
  • Nodes manipulation
  • +
  • Assign navigate URL to nodes
  • Migration From Essential JS 1
  • diff --git a/ej2-asp-mvc-toc.html b/ej2-asp-mvc-toc.html index 78a9f98dde..113c952d06 100644 --- a/ej2-asp-mvc-toc.html +++ b/ej2-asp-mvc-toc.html @@ -3078,6 +3078,7 @@
  • Customize The Tree Nodes Based On Levels
  • Restrict The Drag-and-Drop For Particular Tree Nodes
  • Nodes manipulation
  • +
  • Assign navigate URL to nodes
  • Migration From Essential JS 1
  • From 637256953815aea2919440c13134c87eac77544e Mon Sep 17 00:00:00 2001 From: Saravanan-sf4375 <154953221+Saravanan-sf4375@users.noreply.github.com> Date: Tue, 20 May 2025 18:02:03 +0530 Subject: [PATCH 2/3] 911643: Added ug documentation for Treeview component --- ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md b/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md index 1a8a9b824a..c7cbc19636 100644 --- a/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md +++ b/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Assign URLs to specific nodes in Vue TreeView component +# Assign URLs to specific nodes in TreeView component {% if page.publishingplatform == "aspnet-core" %} From 83f314f3178417cb5ca53f52fb7f2f2527f605e3 Mon Sep 17 00:00:00 2001 From: saravananj-sf4375 <161449214+saravananj-sf4375@users.noreply.github.com> Date: Thu, 22 May 2025 11:59:10 +0530 Subject: [PATCH 3/3] 911643: Addressed the correction in title and committed. --- ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md b/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md index c7cbc19636..93d6f401ae 100644 --- a/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md +++ b/ej2-asp-core-mvc/treeview/how-to/assign-url-to-node.md @@ -1,6 +1,6 @@ --- layout: post -title: Assign URLs to specific nodes in ##Platform_Name## TreeView component | Syncfusion +title: How to Assign URLs to TreeView Nodes in ##Platform_Name## TreeView component | Syncfusion description: Learn here all about Assign URLs to specific nodes in Syncfusion ##Platform_Name## TreeView component of Syncfusion Essential JS 2 and more. platform: ej2-vue control: ej2-asp-core-mvc @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Assign URLs to specific nodes in TreeView component +# How to Assign URLs to TreeView Nodes in TreeView component {% if page.publishingplatform == "aspnet-core" %}