RadDataPager Server Event not firing

7 posts, 2 answers
  1. Rob
    Rob avatar
    6 posts
    Member since:
    Jun 2011

    Posted 13 Jun 2011 Link to this post

    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:

    <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);
        }
  2. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 16 Jun 2011 Link to this post

    Hello Rob,

    Please note that you should not use wrapped RadAjaxPanel and RadXmlHttpPanel. Also you have placed server control into the RadXmlHttpPanel which is not correct and will not work properly. I would suggest you to remove the RadXmlHttpPanel and use only RadAjaxPanel to ajaxify the needed content. Give this a try and let me know if ti makes any difference. Also please refer to the following online help topic which elaborates on what the RadXmlHttpPanel exactly is and in which case it should be used.


    Kind regards,
    Maria Ilieva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 16 Jun 2011 Link to this post

    Hello Rob,

    Please note that you should not use wrapped RadAjaxPanel and RadXmlHttpPanel. Also you have placed server control into the RadXmlHttpPanel which is not correct and will not work properly. I would suggest you to remove the RadXmlHttpPanel and use only RadAjaxPanel to ajaxify the needed content. Give this a try and let me know if ti makes any difference. Also please refer to the following online help topic which elaborates on what the RadXmlHttpPanel exactly is and in which case it should be used.


    Kind regards,
    Maria Ilieva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  5. Rob
    Rob avatar
    6 posts
    Member since:
    Jun 2011

    Posted 16 Jun 2011 Link to this post

    Thanks Maria, I have re-worked my solution.

    I had however, been trying to achieve the functionality described in this demo:

    http://demos.telerik.com/aspnet-ajax/xmlhttppanel/examples/gridinxmlhttppanel/defaultcs.aspx

    Is this scenario no longer supported? I could have saved a great deal of time had I known.

  6. Rob
    Rob avatar
    6 posts
    Member since:
    Jun 2011

    Posted 20 Jun 2011 Link to this post

    Hi,

    Thanks again for your assistance. Could you answer my question in this post regarding: http://demos.telerik.com/aspnet-ajax/xmlhttppanel/examples/gridinxmlhttppanel/defaultcs.aspx

    Thanks,
    Rob.
  7. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 21 Jun 2011 Link to this post

    Hi Rob,

    The mentioned demo actually presents a scenario in which you could use the RadXmlHttpPanel with server controls and in order to have the server events of those controls works correctly RadAjaxPanel I also added. However note that this could not be applicable in all cases and for all server controls. i already discuss this implementation with my colleagues responsive for the RadXmlHttpPanel demos and we decide to remove this one from our site in order to avoid confusing our customers.
    Thank you for bringing this to our attention.

    Kind regards,
    Maria Ilieva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  8. Rob
    Rob avatar
    6 posts
    Member since:
    Jun 2011

    Posted 21 Jun 2011 Link to this post

    HI Maria,

    Thank you very much for clearing that up for me.

    Rob.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017