Welcome Guest Search | Active Topics | Sign In | Register

menu's and callback panel Options
Mopista
Posted: Monday, November 17, 2014 10:53:05 AM
Rank: Member
Groups: Member

Joined: 10/25/2012
Posts: 14
I have an aspx menu inside a callback panel and on loading the menu is automatically expanded. I would like to then use the eo web menu instead but cannot create it dynamically.

Please assist on the easiest way to create an instance this menu dynamically.

Thanks.
eo_support
Posted: Monday, November 17, 2014 11:21:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Dynamically creating a menu is exactly the same as dynamically creating any other ASP.NET server control. So we do not provide any support on that. You can try to get your code working with dynamically creating another standard control (such as asp:Button) and then switch it for our Menu. When you use CallbackPanel, make sure you create the control in early stage of the page's life cycle such as in Page_Init event.

Alternatively, you can try to dynamically create menu item instead of the menu control. You can find a working example on how to dynamically modify a menu here:

http://demo.essentialobjects.com/Demos/Menu/Programming/Server%20Side%20Programming/Dynamically%20Modifying%20Menu/Demo.aspx

The source code is already installed on your machine inside "Samples/Web" directory when you install the product. You can examine the source code to see how it works.

Hope this helps. Please feel free to let us know if you still have any questions.

Thanks!
Mopista
Posted: Monday, November 17, 2014 11:48:43 PM
Rank: Member
Groups: Member

Joined: 10/25/2012
Posts: 14
Hi,

Sorry. I meant actually creating the menu dynamically. Problem is selecting a template menu dynamically. I know that this is not an issue with the control, but I would like to know how to do it. Especially setting up LookItems, ItemID (_TopLevelItem / seperator) etc.

Thank you in advance.
eo_support
Posted: Tuesday, November 18, 2014 11:13:48 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

The easiest way for you to do this is to put the Menu inside a UserControl and then dynamically creating that UserControl instead. This way whatever properties that you want to set you can set at design time in your ascx. This will save you a lot of code.

If you can not do it that way, you basically just have to write the code to set each and every one property you see in your .aspx/.ascx file.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.