RadMenu Item Width

Posted by Community Admin on 03-Aug-2018 13:41

RadMenu Item Width

All Replies

Posted by Community Admin on 24-Oct-2011 00:00
I created a radmenu that dynamically loads its items from a database.  I want to change the width of certain items that the radmenu dynamically creates.  How would I go about this programmatically in vb...?

So far I just figured out how to set the third rad menu item "visible = false" by doing this....

    Protected Sub MainMenu_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MainMenu.Load
        MainMenu.Items(2).Visible = False

    End Sub


HOWEVER, I want to change the width of the rad menu item instead.  I tried this code below but it didnt work....

    Protected Sub MainMenu_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MainMenu.Load
        MainMenu.Items(2).Width = "50px"

    End Sub


I know I am very close... does anyone have any suggestions on how to change the width....

Thanks
Posted by Community Admin on 27-Oct-2011 00:00
Hi Aret,

Can you try defining width like this.
RadMenu1.Items[0].Items[0].Width = Unit.Pixel(200);
RadMenu1.Items[2].Width = Unit.Pixel(50);


Best wishes,
Stanislav Velikov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
This thread is closed