Hello
I'm not getting this right. I want to display a feed from youtube. All the data is comming in fine. The youtube feeds will return chuncks of video's with a startindex ... so I have to use the PageIndexChanged to alter the paging.
Alas, it does only work correct afer I click one of the pages. This means that on original page load, it will still take the default pagesize of 10. Any help would be wonderful.
Btw, this is a radListview with radDatapager.
I'm not getting this right. I want to display a feed from youtube. All the data is comming in fine. The youtube feeds will return chuncks of video's with a startindex ... so I have to use the PageIndexChanged to alter the paging.
Alas, it does only work correct afer I click one of the pages. This means that on original page load, it will still take the default pagesize of 10. Any help would be wonderful.
Btw, this is a radListview with radDatapager.
protected override void LoadPage(){ // make youtube channel channel = new YouTubeChannel(PMSettings.GetPortalSetting("channel"), PMSettings.GetPortalSetting("devkey"), PMSettings.GetModuleSetting("pagesize", 6)); if (!IsPostBack) { // request video feed feed = channel.Search("", 1); // configure list view ListViewVideos.PageSize = feed.PageSize; ListViewVideos.VirtualItemCount = feed.TotalResults; // data bind ListViewVideos.DataSource = feed.Entries; ListViewVideos.DataBind(); }}protected void ListViewVideos_PageIndexChanged(object sender, Telerik.Web.UI.RadListViewPageChangedEventArgs e){ // request video feed feed = channel.Search("", e.NewPageIndex + 1); // configure list view ListViewVideos.PageSize = feed.PageSize; ListViewVideos.VirtualItemCount = feed.TotalResults; // data bind ListViewVideos.DataSource = feed.Entries; ListViewVideos.DataBind();}