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

Bubble Event not rising when using AJAX panel

1 Answer 94 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Esk
Top achievements
Rank 2
Esk asked on 19 May 2008, 09:29 PM
I have the following issue happening:  My application  consists of a header that is in a usercontrol Default page that has a lable and content area that change based on what usercontrol has been loaded when the header ImageButtons are clicked.

I raise a bubble event whenever the header image bubbles are clicked and have a boolean on bubble function that handles the loading of user cotrols based on case by the eventargs that are being passed

in example: Header.ascx.cs
protected void btnHome_Click(object sender, ImageClickEventArgs e)  
        {  
            RaiseBubbleEvent(sender, new CommandEventArgs("Home"""));  
        } 

Default.aspx.cs
protected override bool OnBubbleEvent(object source, EventArgs args)  
        {  
            CommandEventArgs commandEvent = args as CommandEventArgs;  
            if (commandEvent != null)  
            {  
                switch (commandEvent.CommandName)  
                {  
                    case "Home":  
                        LoadUserControl("Home.ascx""Home");  
                        break;  
                }  
                  
            } 

I use your example how to dynamicly load my user controls and it works fine up untill i tried to ajaxify this application.

I have tried a countless of combinations between using ajax panels, panels, content holders, ajax manager and have had no luck what so ever getting it to work. I used to work with the pre-prometius version of telerik for my former employer and was able to do this without an issue. has anything changed? My raiseBubbleEvent gets fired up but my  OnBubbleEvent never gets fired when using the prometius ajax. Do i need to make a custom even for header clicked?
Please help

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="rapHeader">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rapHeader" /> 
                    <telerik:AjaxUpdatedControl ControlID="rapCrumb" /> 
                    <telerik:AjaxUpdatedControl ControlID="rapContent" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
         </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <div id="dFrame">  
        <div id="dHeader" class="header">  
            <telerik:RadAjaxPanel ID="rapHeader" runat="server">  
                <TRP:ucHeader ID="ucHeader" runat="server" Visible="true" /> 
            </telerik:RadAjaxPanel> 
        </div> 
        <div id="dCrumb" style="height">  
            <telerik:RadAjaxPanel ID="rapCrumb" runat="server">  
                <asp:Label ID="lblCrumb" runat="server" Font-Bold="True" /> 
            </telerik:RadAjaxPanel> 
        </div> 
        <div id="dContent" class="content">  
            <telerik:RadAjaxPanel ID="rapContent" runat="server" LoadingPanelID="rlpLoading">  
            </telerik:RadAjaxPanel> 
            <telerik:RadAjaxLoadingPanel ID="rlpLoading" runat="server" Height="75px" Width="75px">  
                <img alt="Loading..." src='Images/loading4.gif' style="border: 0px;" /> 
            </telerik:RadAjaxLoadingPanel> 
        </div> 
          
         
    </div> 

1 Answer, 1 is accepted

Sort by
0
Esk
Top achievements
Rank 2
answered on 20 May 2008, 01:35 PM
Nvm !

I got this issue resolved by adding Ajax Panels inside my header and footer  and in the aspx page i  have now regular panel around the header /footer and Ajax panel arount the content area where controls are being dynamicly loaded. After i wired those up through the AJAX manager i was able to  navigate through  the site using my header navigation just fine with full ajax loads.

May i make suggestion  to add an example like that in your online resources since it seems to be a common use and can cause some confusion.


Blagodaria za vnimanieto vi,
Priaten den mladezhi.
Tags
Ajax
Asked by
Esk
Top achievements
Rank 2
Answers by
Esk
Top achievements
Rank 2
Share this question
or