StaticDisplayLevels ??

11 posts, 0 answers
  1. David
    David avatar
    57 posts
    Member since:
    Nov 2004

    Posted 01 Mar 2008 Link to this post


    Is it too late to ask/hope that Prometheus release includes the "StaticDisplayLevels" property in the menu control?

    I know it's been mentioned a couple times before-- though, I'm surprised not much more.

    It'd be convenient to be able to simply replace a "standard" config'd asp menu & sitemap (with Home as rootnode) without additional code to workaround the levels display.

    So, speaking of workarounds, what might be a recommended way to use the above sitemap and display the first 2 levels?



    Thanks!

    David
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 03 Mar 2008 Link to this post

    Hi David,

    At the time being RadMenu does not support "static" levels. By static I mean levels which are always visible. What we can implement is binding to specific level. Let us know of your opinion.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David
    David avatar
    57 posts
    Member since:
    Nov 2004

    Posted 05 Mar 2008 Link to this post

    Thanks for the reply.

    I managed to workaround by creating a custom sitemapdatasource and overriding the GetHierarchicalView method... cloning the root node, add to collection without the kids, and then adding the kids to the collection.

    My Opinion?..  I would like to see the "StaticDisplayLevels" property added to the menu control, to avoid having to do the above, and to better "drag n drop" replace the asp:menu contol.

    If there's any chance of incorporating before release... that'd be fantastic!

    David   :-)

  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 05 Mar 2008 Link to this post

    Hi David,

    Yesterday our developers added a new feature to RadMenu (and the rest of the navigation controls). It is a property called MaxDataBindDepth. You can use that property to limit the number of levels to bind to the control. For example, setting this property to 2 binds only the root menu items and their immediate children. All remaining records in the data source are ignored.

    Does it make sense?
    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. David
    David avatar
    57 posts
    Member since:
    Nov 2004

    Posted 05 Mar 2008 Link to this post

    Hi Albert,

    Yes, that makes sense, and  I can see that being useful in certain scenarios, but doesn't apply to the static display.

    Could you present this to the developers?

    Thanks again!!

    David
  7. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 05 Mar 2008 Link to this post

    Hi David,

    Unfortunately implementing static levels won't be that easy - it would require changes in the rendering and client-side logic.

    I have logged static levels as a feature request but I am afraid we won't be able to implement it for the official Q1 2008 release. Based on customer feedback we may introduce static display levels in a future release.

    Regards,
    Atanas Korchev,
    the Telerik dev team

    Instantly find answers to your questions at the new Telerik Support Center
  8. David
    David avatar
    57 posts
    Member since:
    Nov 2004

    Posted 05 Mar 2008 Link to this post

    That sounds great!

    Thanks!

    David
  9. Chris
    Chris avatar
    16 posts
    Member since:
    Mar 2007

    Posted 02 Dec 2008 Link to this post

    Just to add to the record... we'd be interested in the static levels attribute as well or any workaround you've come up with at this point... We're working to create a 2 level deep, all static menu using Rad Menu... will probably use another tool until Rad Menu can do this.

    Best Regards,
    Chris Reddick
  10. David
    David avatar
    57 posts
    Member since:
    Nov 2004

    Posted 17 Dec 2008 Link to this post

    What I've been doing in my apps.. is just to use a simple Custom SiteMapDatasource for controls requiring display of 2 levels, ie; asp:menu, and the standard SiteMapDataSource for all else reqs.. like:

    namespace MyNamespace.Providers 
     
        public class CustomSiteMapDataSource : SiteMapDataSource 
        { 
            public CustomSiteMapDataSource() { } 
     
            protected override HierarchicalDataSourceView GetHierarchicalView(string viewPath) 
            { 
                SiteMapNode root = Provider.RootNode; 
                SiteMapNode rootClone = root.Clone(); 
                SiteMapNodeCollection nodeCollection = new SiteMapNodeCollection(); 
     
                nodeCollection.Add(rootClone); 
                rootClone.ChildNodes = new SiteMapNodeCollection(); 
     
                foreach (SiteMapNode node in root.ChildNodes) 
                    nodeCollection.AddRange(RecursiveNodesCheck(node)); 
     
                return new SiteMapHierarchicalDataSourceView(nodeCollection); 
            } 
     
            private SiteMapNodeCollection RecursiveNodesCheck(SiteMapNode Node) 
            { 
                SiteMapNode nodeClone = Node.Clone(); 
                SiteMapNodeCollection OutputCollection = new SiteMapNodeCollection(); 
                SiteMapNodeCollection ChildrenCollection = new SiteMapNodeCollection(); 
     
                foreach (SiteMapNode ChildNode in Node.ChildNodes) 
                    ChildrenCollection.AddRange(RecursiveNodesCheck(ChildNode)); 
     
                nodeClone.ChildNodes = ChildrenCollection; 
                OutputCollection.Add(nodeClone); 
                return (OutputCollection); 
            } 
        } 
     
     

    Hope that helps!

    Maybe Telerik could implement "StaticDisplayLevels" into 2009 Q1 RadMenu.

    D  :-)
  11. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 18 Dec 2008 Link to this post

    Hi David,

    Static display levels is not in our plans for Q1 2009.

    Regards,
    Atanas Korchev,
    the Telerik dev team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  12. Jake
    Jake avatar
    27 posts
    Member since:
    Feb 2009

    Posted 18 Mar 2009 Link to this post

    We also would like to see StaticDisplayLevels incorporated into a near future release.

    There is a nice work-around mentioned in this post: http://www.telerik.com/community/forums/aspnet/menu/horizontal-menu-from-sitemap.aspx

    Set the ShowStartingNode property to false, and the menu will display all 1st level children horizontally.  Since I wanted my home page to display in the menu along side the 1st level children, I put a sitemapnode pointing to the home page at the same level as my 1st level children.  I then pointed the root node to my login page (the sitemap provider requires a valid URL for all nodes).

    Hope this helps!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017