I"m sure you guys are working on this but would it help everyone if we started to add to the demos to show aspects of using these tools against Core Razor Pages?
I'm just conscious of not wanting to post too many questions when i can't find demos i'm interested in.
Cheers,
John
6 Answers, 1 is accepted
To work with Razor Pages you don't need anything different than a normal application setup. The steps to enable Kendo in the projects are the same, as described in this article:
https://docs.telerik.com/aspnet-core/getting-started/getting-started
Although with Razor pages you don't need a dedicated Controller for each view, you still can create controllers for your service layer, that can be used by the Kendo DataSource for example.
Hope this clarifies things.
Regards,
Bozhidar
Progress Telerik
Hi Bozhidar,
Thanks for your reply.
Sorry but I do not agree with what you have said. From my point of view, almost all examples contain the 'controller/ action' parameters for data-source binding. They were of course written well before Core Razor Pages came along.
However, if one is using Razor Pages it defeats the purpose to then have a controller contrived to handle the UI component (eg Grid). I would have expected the Grid or Map to be able to handle the Razor Pages. And I understand that for example the Grid can only because I asked. Not because it was documented.
So back to my request/point - if it is possible - please could we simply have samples?
I've no idea if this is on you documentation road map already- but it would seem to me to make sense to make it available given the Razor Page approach will eventually become very popular.
I was simply trying to avoid having to ask repeated questions and save you some effort/time.
Cheers, John
I want to separate the two ways a widget can be bound, in order to prevent further confusion.
Local binding - here a widget is bound to a model, and is read only. No services are invoked here, and the binding is one-way (no editing). This is implemented either by passing the model in the constructor of the widget, or using the BindTo method. For instance:
https://demos.telerik.com/aspnet-mvc/grid/local-data-binding
Modifying this sample to work with RazorPages is as simple as passing the model field that holds the collection into the Grid constructor.
Remote binding - here the widget is bound to remote endpoints, being MVC Controller, WebAPI, OData, SignalR etc. Here the datasource is capable of full CRUD operations. However this doesn't use the model of the page, and has to reference service endpoints. Currently such endpoints are not supported by RazorPages (or the support is clunky at best). Therefore in such scenarios you need to reference a service layer, not located in the RazorPage.
Regards,
Bozhidar
Progress Telerik
hi Bozhidar,
thank for your responses ..
is there the possiblity that telerik grid , have razor pages support in next versions ?
Based on my previous reply, could you clarify what kind of support you are referring to? Could you specify what features and capabilities regarding Razor Pages you want to see in the Grid widget?
Regards,
Bozhidar
Progress Telerik