RADMenu Item Hide issue

4 posts, 0 answers
  1. Sumit Mittal
    Sumit  Mittal avatar
    4 posts
    Member since:
    Nov 2009

    Posted 26 Nov 2009 Link to this post

    Hi

    I am having a RADMenu in which i am having many items.
    RadMenu.DefaultGroupSettings.Height = Unit.Pixel(100) property set in order to fix scroll after that hieght.

    After i  hide some top items in JS my other items are hanged in space.

    Find attached Screen shot.


    Thanks
    Sumit Mittal

  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 27 Nov 2009 Link to this post

    Hi Sumit,

    Could you please paste here some code snippet that shows how exactly teh manu is defined and how you remove the items?

    Thanks,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Sumit Mittal
    Sumit  Mittal avatar
    4 posts
    Member since:
    Nov 2009

    Posted 29 Nov 2009 Link to this post

    Hi Paul,

    I am creating dynamic RadMenu and adding to RadToolBar

    //At Page_Load

     

    RadMenu objRadMenu =

    new RadMenu();

     

    objRadMenu.ID =

    "objMenu";

     

    objRadMenu.DefaultGroupSettings.Height =

    Unit.Pixel(100);

     

    objRadMenu.OnClientItemClicked =

    "MenuItemClicked";

     

    objRadMenu.EnableEmbeddedSkins =

    false;

     

    objRadMenu.Skin =

    "TopNavigation";

     

    objRadMenu.EnableRootItemScroll =

    true;

     

    objRadMenu.EnableAutoScroll =

    true;

     

    //Code to Add MenuItem (Not Pasted)

    //JS Code to remove

     

    var

     

    toolBar = window.parent.$find("_ctl0_rtbMenuBar_i0_objMenu");

     

     

    if(toolBar!=null)

     

    {     

     

        var menuRollBackLength = toolBar._findItemByAttribute("MenuTypeID",36)._getAllItems().length;

     

     

        var menuRollBackArray = toolBar._findItemByAttribute("MenuTypeID",36)._getAllItems();//Column Array

     

     

     

     

     

     

     

        

     

     

     

        for(var i=0; i< menuRollBackLength; i++)

     

        { 
           //Depending on some logic i hide items

     

     

            if(tempThemeID != ThemeID.value )

     

            {

                menuRollBackArray[i].set_visible(

    false);

     

            }

     

            else

     

     

     

     

            {

                menuRollBackArray[i].set_visible(

    true);

     

            }

    }

     

     

    toolBar.commitChanges();

     

     


     

     

  4. Yana
    Admin
    Yana avatar
    4850 posts

    Posted 01 Dec 2009 Link to this post

    Hello Sumit,

    Please call the following method for the parent item which contains the hidden items:

    parent._updateScrollWrapSize();
    parent._slide.updateSize();
    parent._positionChildContainer();

    I've attached my test page for a reference.

    All the best,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top