Problem with per-item template

5 posts, 1 answers
  1. Billy
    Billy avatar
    5 posts
    Member since:
    Jun 2012

    Posted 17 Jun 2012 Link to this post

    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

  2. Answer
    Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 19 Jun 2012 Link to this post

    Hello Billy,

    Can you show us the page markup for your "mega menu", so we can see what the problem could be.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Billy
    Billy avatar
    5 posts
    Member since:
    Jun 2012

    Posted 20 Jun 2012 Link to this post

    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>
  5. Billy
    Billy avatar
    5 posts
    Member since:
    Jun 2012

    Posted 21 Jun 2012 Link to this post

    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
  6. Billy
    Billy avatar
    5 posts
    Member since:
    Jun 2012

    Posted 21 Jun 2012 Link to this post

    OK. False alarm. copy and paste error. Duh.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017