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

[Solved] RadAjaxManager to work with Web Service menu items

4 Answers 151 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Eduardo
Top achievements
Rank 1
Eduardo asked on 05 May 2009, 07:46 PM
Hi,

I'm not sure I'll be able to explain correctly, but let's try.

I created a RadMenu that is populated by a web service (following the examples provided). But now I was trying to use the RadAjaxManager to call a server-side code to, on the menu items click, populate another control (in this case another RadMenu playing the role of a Breadcrumb). The problem is that these menu items that are created via web service doesn't fire the server-side event. the root (which I manually added as it is static) works fine.

Basically, this is what I have on the aspx, which I think explains a bit of what I mean
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="rmModules"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="mnBreadCrumbs" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadMenu ID="rmModules" runat="server"  
            Skin="Outlook" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" 
            OnClientItemClicking="onClicking" OnItemClick="rmModules_ItemClick" 
            EnableViewState="false" EnableAjaxSkinRendering="false" EnableOverlay="false"
            <WebServiceSettings Path="NavigationItems.asmx" Method="GetMenuCategories" UseHttpGet="false" /> 
        </telerik:RadMenu> 
        <telerik:RadMenu ID="mnBreadCrumbs" runat="server"
        </telerik:RadMenu> 
    </div> 
 
 

Is it possible to do something like what I want to do? or the only way to do that is via client-side javascript?

Thanks,
Eduardo

4 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 08 May 2009, 11:31 AM
Hi Eduardo,

I could not reproduce the problem in a simple page.

Please find attached a sample project.

Let me know what is different in your case.

P.S. In the second menu I am adding a fake invisible item because otherwise there is a javascript error when the menu contains no items (this is already fixed in the latest internal builds).

Regards,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eduardo
Top achievements
Rank 1
answered on 28 May 2009, 02:49 PM
Hi,

Sorry for taking so long to get back to you. I finally had some time to play with your sample. It really worked all fine. But I don't know what is going wrong with my main project, the postback event specific to that control doesn't fire, the strange thing is that it still works with other controls.

Is there anything on ASP.NET that I can do to get back the event to work again?

Thanks,
Eduardo
0
Atanas Korchev
Telerik team
answered on 01 Jun 2009, 09:04 AM
Hi Eduardo,

Unfortunately we are not sure where this problem comes from. One reason for the ItemClick event not to fire is having the NavigateUrl property of the menu item set. In that case clicking the menu item navigates instead of postback.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eduardo
Top achievements
Rank 1
answered on 01 Jun 2009, 12:50 PM
Hi Albert,

I didn't have the NavigateUrl set up for that menu. I think it is an ASP.NET issue. Anyway, I resolved this by creating a new page, adding the controls again and copying all the code. It was a lot of work, but at the end it worked.

Thanks,
Eduardo
Tags
Menu
Asked by
Eduardo
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Eduardo
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or