Hi,
I've been knocking my head against this problem for a full day now - any help will be very much appreciated.
I have a databound RadPanelBar, each Panel contains a set of search results. The display of results is encapsulated in a user controls, SearchResults. The user control is instantiated in the item template of the panel bar, and on databinding, it's event delegates are set - yest these are never called when the datapager posts back from the client.
The markup looks like this:
The databinding code sets the delegates for the pager's server events as follows:
I've been knocking my head against this problem for a full day now - any help will be very much appreciated.
I have a databound RadPanelBar, each Panel contains a set of search results. The display of results is encapsulated in a user controls, SearchResults. The user control is instantiated in the item template of the panel bar, and on databinding, it's event delegates are set - yest these are never called when the datapager posts back from the client.
The markup looks like this:
<telerik:RadPanelBar ID="resultsPanelBar" runat="server" ExpandMode="FullExpandedItem" > <ItemTemplate> <telerik:RadAjaxPanel ID="wrapperPanel" runat="server" RequestQueueSize="10"> <telerik:RadXmlHttpPanel RequestQueueSize="4" LoadingPanelID="searchLoadingPanel" ID="resultsUpdatePanel" runat="server"> <selfsvc:SearchResults ID="searchResult" runat="server" /> </telerik:RadXmlHttpPanel> </telerik:RadAjaxPanel> </ItemTemplate></telerik:RadPanelBar>The databinding code sets the delegates for the pager's server events as follows:
void resultsPanelBar_ItemDataBound(object sender, Telerik.Web.UI.RadPanelBarEventArgs e){ string sourceName = ((KeyValuePair<string, string>)e.Item.DataItem).Key; RadXmlHttpPanel panel = (RadXmlHttpPanel)e.Item.FindControl("resultsUpdatePanel"); if (panel != null) { selfService.UserControls.SearchResults results = (selfService.UserControls.SearchResults)panel.FindControl("searchResult"); if (results != null) { results.SourceName = sourceName; RadDataPager pager = (RadDataPager)results.FindControl("RadDataPager1"); if (pager != null) { pager.Command += new EventHandler<RadDataPagerCommandEventArgs>(pager_Command); pager.PageIndexChanged += new EventHandler<RadDataPagerPageIndexChangeEventArgs>(pager_PageIndexChanged); } } clientPnlSrcMap.Add(panel.ClientID, sourceName); panel.ServiceRequest += new XmlHttpPanelEventHandler(panel_ServiceRequest); }