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

Problem with per-item template

4 Answers 72 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Billy
Top achievements
Rank 1
Billy asked on 17 Jun 2012, 10:54 PM
I'm trying to great a megamenu, using the online demo "Mega-menu" dropdown as a guide. That is, my template is a per-item template, not a global one. 

I've created a throwaway project and copied the demo code pretty closely. But it doesn't work like the demo. The RadSiteMap control is rendered immediately, and the parent "Products" menu item is not visible. In the online demo, the template and RadSiteMap doesn't show until the user hovers over the parent menu item.

I'm a Telerik newbie so I'm sure this is some bone-headed move on my part. Can anyone help?

-BillyB

4 Answers, 1 is accepted

Sort by
0
Accepted
Kevin
Top achievements
Rank 2
answered on 19 Jun 2012, 01:00 PM
Hello Billy,

Can you show us the page markup for your "mega menu", so we can see what the problem could be.
0
Billy
Top achievements
Rank 1
answered on 21 Jun 2012, 02:57 AM
Uh, yes of course. My bad. 
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Megamenu._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <h2>
        Welcome to ASP.NET!
    </h2>
    <telerik:RadMenu ID="RadMenu1" runat="server" Width="880px" Height="60px"
        EnableShadows="True">
        <Items>
            <telerik:RadMenuItem runat="server" Text="Product" PostBack="false">
                <ItemTemplate>
                <div id="CatWrapper" style="width: 435px;">
                    <h3>Categories</h3>
                    <telerik:RadSiteMap ID="RadSiteMap1" runat="server" EnableTextHTMLEncoding="true">
                        <LevelSettings>
                            <telerik:SiteMapLevelSetting Level="0">
                                <ListLayout RepeatColumns="3" RepeatDirection="Vertical" />
                            </telerik:SiteMapLevelSetting>
                        </LevelSettings>
                        <Nodes>
                            <telerik:RadSiteMapNode NavigateUrl="#" Text="Furniture">
                                <Nodes>
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Tables & Chairs" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Sofas" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Occasional Furniture" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Childerns Furniture" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Beds" />
                                </Nodes>
                            </telerik:RadSiteMapNode>
                            <telerik:RadSiteMapNode NavigateUrl="#" Text="Decor">
                                <Nodes>
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Bed Linen" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Throws" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Curtains & Blinds" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Rugs" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Carpets" />
                                </Nodes>
                            </telerik:RadSiteMapNode>
                            <telerik:RadSiteMapNode NavigateUrl="#" Text="Storage">
                                <Nodes>
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Wall Shelving" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Kids Storage" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Baskets" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Multimedia Storage" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Floor Shelving" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Toilet Roll Holders" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Storage Jars" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Drawers" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Boxes" />
                                </Nodes>
                            </telerik:RadSiteMapNode>
                            <telerik:RadSiteMapNode NavigateUrl="#" Text="Lights">
                                <Nodes>
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Ceiling" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Table" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Floor" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Shades" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Wall Lights" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Spotlights" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="Push Light" />
                                    <telerik:RadSiteMapNode NavigateUrl="#" Text="String Lights" />
                                </Nodes>
                            </telerik:RadSiteMapNode>
                        </Nodes>
                    </telerik:RadSiteMap>
                </div>
                </ItemTemplate>
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" Text="Stores">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" Text="News">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" Text="Events">
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
</asp:Content>
0
Billy
Top achievements
Rank 1
answered on 22 Jun 2012, 02:22 AM
Forgot to add: this page is a very close copy of the demo "mega dropdown" found at http://demos.telerik.com/aspnet-ajax/menu/examples/megadropdown/defaultcs.aspx. Only certain user controls for the Telerik demo site itself are missing.

That's why I'm puzzled that it doesn't work.

-B
0
Billy
Top achievements
Rank 1
answered on 22 Jun 2012, 02:30 AM
OK. False alarm. copy and paste error. Duh.
Tags
Menu
Asked by
Billy
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Billy
Top achievements
Rank 1
Share this question
or