Samples ASP.NET Core components

1 Answer 878 Views
Grid
serge
Top achievements
Rank 2
Bronze
Iron
Iron
serge asked on 10 Aug 2021, 07:47 AM | edited on 10 Aug 2021, 08:22 AM

We see a lot of samples in the demo pages.

However, we would like to see them in action and download the fully functional demo on localhost. 

On Git I didn't found the samples. Is there, and, if is, where, the sources for ASP.NET compoentnts.

I wonder especially for a sample example of DataGrid, like this one https://demos.telerik.com/aspnet-core/grid/editing-custom

.NET 5 (CORE) for RazorPages, by example

1 Answer, 1 is accepted

Sort by
-1
Tsvetomir
Telerik team
answered on 12 Aug 2021, 01:41 PM

Hi Serge,

The whole project from which the ASP.NET Core demos site is seeded is shipped in the installation folder. You could find the Visual Studio project at:

~installationFolder\wrappers\aspnetcore\Examples\AspNet.Core\VS2019\Kendo.Mvc.Examples

Moreover, we have a dedicated repository for corner cases that are for Razor Pages and MVC.

https://github.com/telerik/ui-for-aspnet-core-examples

Please note that the only difference between the MVC and RazorPages is the URL routing and generation. Other options are held equal. 

If there is anything else I can help with, let me know.

 

Regards,
Tsvetomir
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

serge
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 12 Aug 2021, 02:24 PM | edited

as I understood, Razor Pages uses ViewModels directly on the page, and only BusinessModels need to be created. MVC we need to create the Model, and the ViewModel, so classes are differently structured, in RazorPages we don't have Views, and the EF logic should be different in that case...
More than that, the code in the example on web is not found in that project. By ex, I 've searched "@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()" and such a code is not available nor in MVC, nor in RazorPages projects, however present in examples
Tsvetomir
Telerik team
commented on 13 Aug 2021, 10:54 AM

Indeed, you are correct. The example from the web is not available in the repository because that example is shipped from another repository into your installation folder. If you have installed the Telerik UI for ASP.NET Core in your project via NuGet, you should download the examples from your telerik.com account:

https://www.telerik.com/account/product-download?product=UIASPCORE

After the download, you should search for the Kendo.Mvc.Examples solution where the demo will be available.

serge
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 13 Aug 2021, 03:23 PM | edited

I expected to have a zip with examples, you gave me an MSI setup... normally I don't want to update or reinstall the components, I need only the samples...

 

serge
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 13 Aug 2021, 03:34 PM

please allow to delete comments. I installed the zip. The sample is ultracomplex for a begginner. it's better to have independent multiple samples that a big application with complex partial controllers and crazy session data binding...

a sample should be sample.

serge
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 13 Aug 2021, 04:06 PM

not only the exercices in the sample are extra complex, but there is MVC, not razor pages, and in MVC is razor notation, in the RazorPages is tag helper notation, is a mess... How a beginner cand understand that?
Aleksandar
Telerik team
commented on 18 Aug 2021, 11:37 AM

Serge, for general requirements on using Telerik UI for ASP.NET Core components in RazorPages application you can refer to the documentation section below:

Using Telerik UI for ASP.NET Core in a Razor Pages Project

Generally speaking, as a major difference to MVC application, for data bound components you need to make sure to send the AntiForgeryToken with each POST request of the page. 

I see Tsvetomir has shared the Repository we have with examples of the Component's use in RazorPages application:

https://github.com/telerik/ui-for-aspnet-core-examples

It contains general examples on how to bind components to data and in some cases more complex example. You can review it for samples and details how to use the components. If you have any specific issues I can suggest creating a forum post on them so they can be discussed or submitting a support  ticket. 

If you feel there is some major lack in the documentation or you miss any details on making the Telerik UI for ASP.NET Core components work in RazorPages feel free to share your thoughts. We will consider them for improving the documentation.

serge
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 24 Oct 2021, 10:51 AM

once again I had to search where the samples for the grid are... you gave the link to two projects: one on local disk, another on github, however these two are different projets with different content... Why do not put all in gitHub, in order that people do not search on localdrive "installedfolder" is hard to find on the disk, and the other one github is very small and incomplete, a lot of examples from the demo missing.... Why do not put complete examples branch on gitHub to be accessible for anyone for view.
Aleksandar
Telerik team
commented on 27 Oct 2021, 01:22 PM

Serge, the two projects you refer to are indeed different and that is why they are distributed in a different manner.

  •  The ASP.NET Core demos site is part of the official distribution and is available in the installation folder. It includes a lot of other logic other than the demos themselves. Its goal is to highlight the main features and configuration options for Telerik UI for ASP.NET Core components.
  • The RazorPages example project highlights particular scenarios when the components are used in RazorPages, eg. particularities for data bound components, handling the submission of antiforgery tokens, etc. It is a supplementary application aimed at demonstrating approaches on different frequently asked questions, features and scenarios for Telerik UI for ASP.NET Core components.

I will bring to the team's attention the suggestion to additionally share the demo application on GitHub. In the meantime you and anyone else can review the demo site application locally in the installation folder, via the path specified in the thread above.

serge
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 02 Nov 2021, 09:01 AM

Far not all the demos are available in GitHub. Sometimes we need just to see context of the code that is demonstrated in the "demo" pages of the Telerik site. If all the demos you have on the site were on GitHub, would be great.
Tsvetomir
Telerik team
commented on 03 Nov 2021, 04:05 PM

Hi, Serge, indeed, the full source code for the demos is not readily available on GitHub, or at least, they are not available in a public repository. What we do is that we develop in a VS project that contains several auxiliary projects such as the tests, source, demos, export functionality etc. After that, with each release we distribute the project with the respective release files. 

As Aleksandar mentioned, we will raise your feedback for discussion in the team.

Trent
Top achievements
Rank 1
commented on 27 May 2023, 01:37 PM

Hello.  It's been a couple years and still all of the ASP Core UI examples are all MVC/Controllers with a few select Razor examples provided.  For those of us NOT using MVC, did the (GIT) project ever get updated with Razor samples for all of the Examples out on https://demos.telerik.com/aspnet-core -->  https://demos.telerik.com/aspnet-core/grid or are people still running the MVC project to glean the straight Razor solutions?  Thanks

Stoyan
Telerik team
commented on 31 May 2023, 03:43 PM | edited

Hi Trent,

We've indeed missed updating this thread with the latest development relating to the topic. We have decided against distributing all the ASP.NET Core Demos in a separate Razor Pages project. Here are the reasons behind this decision:

  1. Generally, Telerik UI is a front-end product and the configuration of the back-end is left for the individual developer to customize.
  2. Creating a separate Demos project for Razor Pages will essentially double the amount of examples that we will need to maintain without introducing any more Component functionalities. Although this will decrease the learning curve of the product it will be detrimental to the quality of the product for more experienced users since we will have to be focused on the maintenance of both Demo projects.

With that being said, I have submitted a Feature Request in our feedback portal for the adaptation of the .NET Core MVC Scaffolders for Razor Pages as well. This way we will be able to evaluate the community interest in such a feature. This is one of the ways we determine what to include in our future planning.

Please be aware that because the feature request has been created internally, it has been submitted on behalf of Serge who is Original Publisher of the current forum thread.

Finally, here are the available options to get help if you currently experience difficulties with the configuration of our Components in a Razor Pages project:

I hope the information above is insightful.

 

Tags
Grid
Asked by
serge
Top achievements
Rank 2
Bronze
Iron
Iron
Answers by
Tsvetomir
Telerik team
Share this question
or