ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Nested grids / Hierarchical grid in razor pages.
Title:
B
I
{code}
?
Is there any example of implementing Nested grids / Hierarchical grid in dotnet core razor pages. I know we demo of Nested grids / Hierarchical grid using MVC.I downloaded dotnet core razor pages demo, but I don't find that part in that solution.
Save Changes
Cancel
Baresha Shaik
asked at 28 Oct 2021
Answers
B
I
{code}
?
you can use the exact same code for razor pages, as shown here: https://demo.aspnetawesome.com/GridNestingDemo#Nested-grids--Hierarchical-grid the only difference can be when you set `Url`, in Razor pages you may use `Url.Page` instead of `Url.Action` so instead of: new Nest { Name = "detailnst", Url = Url.Action("MealGrid"), LoadOnce = true } in razor pages you could have (if you're not using controllers): new Nest { Name = "detailnst", Url = Url.Page("", "MealGrid"), LoadOnce = true } and instead of having the `MealGrid` action in a controller, you will have `OnGetMealGrid` page method in a PageModel ( e.g. `Index.cshtml.cs` ) but the rest of the code will be exactly the same
Save Changes
Cancel
Omu
answered at 28 Oct 2021
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK