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

Pager and DataSource Within ViewComponent

3 Answers 128 Views
Pager
This is a migrated thread and some comments may be shown as answers.
Janson
Top achievements
Rank 2
Iron
Iron
Janson asked on 08 Apr 2021, 06:07 PM

I am trying to use a ViewComponent to encapsulate a simple dataset using a pager and datasource.  Using the example from https://demos.telerik.com/aspnet-core/pager , I can get the example to work directly in a Razor page.  When wrapped in a ViewComponent, the script for the DataSource is never rendered.  This appears to be a server-side rendering issue, as the <script>dataSource1=....</script> is never rendered.  Also, when doing similar example for Grid and ListView, they work fine.

Should pager and dataSource work in a viewComponent?  Maybe I missed something.

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 13 Apr 2021, 09:07 AM

Hello Janson,

 

Thank you for writing to us.

We have not tested the widgets in such a scenario. Could you send me a very basic runnable project demonstrating the issue so I can forward it to our Dev/QA team for further insight whether this is supported or not.

 

Regards,
Eyup
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

0
Janson
Top achievements
Rank 2
Iron
Iron
answered on 13 Apr 2021, 11:51 PM

Eyup,

Maybe this is something you could send to your QA team to work out?  Basic Pager/Data Source within a ViewComponent.  Nice blog article at https://www.telerik.com/blogs/why-you-should-use-view-components-not-partial-views-aspnet-core  that they could follow.

0
Eyup
Telerik team
answered on 16 Apr 2021, 08:49 AM

Hi Janson,

 

I will log this issue in our backlog system so it can reach other people as well.

Thank you once again for bringing this issue to our attention. I've updated your Telerik points as a token of gratitude.

 

Regards,
Eyup
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Tags
Pager
Asked by
Janson
Top achievements
Rank 2
Iron
Iron
Answers by
Eyup
Telerik team
Janson
Top achievements
Rank 2
Iron
Iron
Share this question
or