This is a migrated thread and some comments may be shown as answers.

Documentation for Core 3 and razor pages?

3 Answers 401 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Noah
Top achievements
Rank 1
Noah asked on 29 Jan 2020, 03:10 PM

Is there any documentation available on how to get Grid working in razor pages with core 3? All I can find is either incomplete or for MVC.

Specifically I'm looking for something that documents how to pass in page index/size so that the data provider function can only fetch the rows needed from the DB. So either a custom reader or something.

The official docs don't have anything.

I've found the razor pages examples on github here : https://github.com/telerik/ui-for-aspnet-core-examples/tree/master/Telerik.Examples.RazorPages/Telerik.Examples.RazorPages

But they don't have any explanation about why things are done the way they are in each case and what specifically is needed to make things work in razor.

I've tried to adapt those examples in my own case but although I can get the grid to call the read method, the grid remains empty. 

 

 

3 Answers, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 03 Feb 2020, 12:15 PM

Hi Noah,

There is a limitation regarding that the Razor Pages use "Page" in their routing mechanism which interferes with GET requests made by the DataSource. Thus, only POST requests should be used with paging. More information about this is available here - https://docs.telerik.com/aspnet-core/getting-started/installation/razor-pages-integration

Could you please check if this is the case in your project?

Further, indeed, we do not have a dedicated Razor Pages documentation. However, anything regarding ASP.NET Core - https://docs.telerik.com/aspnet-core/introduction is also relevant for the Razor Pages scenario.

 

Regards,
Preslav
Progress Telerik

Get quickly onboarded and successful with Telerik UI for ASP.NET Core with the dedicated Virtual Classroom technical training, available to all active customers.
0
Noah
Top achievements
Rank 1
answered on 03 Feb 2020, 02:14 PM

The issue in my case was caused by a JSON serialization issue. As described here:

https://www.telerik.com/forums/all-grids-stopped-showing-the-data

and

https://docs.telerik.com/aspnet-core/getting-started/prerequisites/environment-support#json-serialization

Changing the JSON serialization settings in the startup file fixes the issue and the data is then bound to the grid.

 

You should make a note of that issue in the grid documentation. 

 

0
Preslav
Telerik team
answered on 06 Feb 2020, 11:15 AM

Hi Noah,

I am glad to hear that the issue is now resolved.

Thank you for your feedback. Based on it, I logged the following issue - https://github.com/telerik/kendo-ui-core/issues/5587

 

Regards,
Preslav
Progress Telerik

Get quickly onboarded and successful with Telerik UI for ASP.NET Core with the dedicated Virtual Classroom technical training, available to all active customers.
Tags
Grid
Asked by
Noah
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Noah
Top achievements
Rank 1
Share this question
or