can you please provide a Sample for using Partial Razor Pages for Grid Create/Edit actions. I want to use my custom Pages within Modal Popups. Haven't found anything in this direction in the documentation or samples here.
Really appreciate your help
Best regards
Paul
3 Answers, 1 is accepted
0
Tsvetomir
Telerik team
answered on 27 Nov 2019, 07:30 AM
Hi Paul,
In general, the Kendo UI PopUp edit mode allows for rendering a partial view within its container. The configuration of the same would be as follows:
And the CustomEditorTemplate is a partial view added to the EditoTemplates folder of the project inside the Shared folder. A sample content could be found here:
In case additional assistance is required, let me know.
Best regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.
thank you for pointing in this direction.
What if I need to implement custom validation, post logic? Can I define a page model for editor template?
Best regards
Paul
0
Tsvetomir
Telerik team
answered on 02 Dec 2019, 09:40 AM
Hi Paul,
The editor template of the grid could be bound to a specific model. It is mandatory that it is the same model as the one used in the grid. For instance, if the grid is bound to a collection of "MyViewModel", you would have to declare the same one at the top of the editor template:
@model MyViewModel
// editor declaration
. . .
Note that you might have to add the Namespace in front of the model in case it is not globally added to the application:
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.