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

Access PageSize for Radpager in Layout

1 Answer 46 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 02 Jul 2011, 04:39 PM
I am using a RadListView per the sample at http://www.telerik.com/help/aspnet-ajax/listview-datapager-for-paging.html
The Datapager is in the layout template. I want to access the PageSize of the Radpager in the code behind but I can not find it to set. Since it is in the Layout template it is not visible in the VS dropdown. I tried to simply place a value in the PageSize using <% =value%> and I get an error saying that the string value cannot be translated to Int32. I verified that the value is in fact a number. I tried to do a RadListView1.LayoutTemplate.FindControl but this not supported. Please help, my client really wants to be able to set this page size dynamically and I can find no way to get to this.

Thanks in advance for your help.

Terry

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 06 Jul 2011, 04:05 PM
Hello Terry,

In order to implement the desired functionality I recommend that you use a RadDataPagerTemplatePageField with a PagerTemplate as it is shown here.

I hope this helps.

All the best,
Mira
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ListView
Asked by
Terry
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or