I have a User Control with a ListView that is using the RadDataPager. I wanted to do something fairly simple and that was to have a PageSize property on my user control that could be used to set the RadDataPager.PageSize property.
Now, I did get this to working using the following code:
<telerik:RadDataPager ID="DataPager" runat="server" PagedControlID="myListView" |
PageSize="<%#this.PageSize%>"> |
The only issue I have with this is this that if the page size is different from whatever the default value is, the parent listview DataBound event is fired two times, once for the original page size, and a second time if a new value is specified.
Although this is not a big issue, it would be cool if there were a way to set the RadDataPager.PageSize property before its gets databaound; however, I was not able to find the "DataPager" using the listviews.FindControl method any earlier in the page life cycle.
I did try Page_Load, ListView.NeedDataSouce, ListView.DataBinding, ListView.Init.