Multi-Column Menu Not Breaking Correctly

4 posts, 0 answers
  1. Bill
    Bill avatar
    2 posts
    Member since:
    Jul 2014

    Posted 19 Sep 2014 Link to this post

    I have implemented a RadMenu with everything being handled in the code behind.  I am trying to dynamically set the number of columns based on the total number of menu items (nodes and child nodes).  I am doing something like this:

    // determine column count
    int rowsPerColumn = 15; // [TODO] Add value to site meta data to allow adjusting length per site
    int columnCount = (int)Math.Ceiling(((double)_menuItemCount / (double)rowsPerColumn));
    rootLevelSetting.ListLayout.RepeatColumns = columnCount;

    The value for _menuItemCount is being updated during the PopulateSiteMap function.  That is working fine.  And, so is the assigning of the column count.  For one of my menu items, I am getting a long first column and short second and third columns.  Three columns should work fine.  I have attached some images for review.  Ideally, the second column should start with the External category.

    Any help would be appreciated!
    Bill
    Telerik.Web.UI v2013.1.220.40 (I know we are behind a bit -- working on that :) )
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 24 Sep 2014 Link to this post

    Hello Bill,

    First I would like to explain a bit about the RepeatColumns property. Its purpose is to divide the RadMenu items equally between the number of columns.
    From the attached image I can see that there are 5 items altogether. In order to divide 5 items between 3 columns the items should be ordered as follows: two for the first column, two for the second and 1 for the last one.
    In this case having only one item in first and second column and placing the rest of the items in the third column is not supported scenario using the RepeatColumns property.


    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bill
    Bill avatar
    2 posts
    Member since:
    Jul 2014

    Posted 24 Sep 2014 Link to this post

    That is extremely disappointing.  I will need to scrap RadMenu and find something else.  Thanks for responding!  Hope to see this managed somehow in a future release.
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 27 Sep 2014 Link to this post

    Hello,

    A kind of workaround for your case would be adding two empty menu items for both first and second column. This way the items will be altogether 9 and will be divided by 3 in each column. Since those 4 items will be invisible they will not affect the RadMenu appearance. 


    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top