Menu Editor at runtime

2 posts, 0 answers
  1. Chris
    Chris avatar
    1 posts
    Member since:
    Jun 2008

    Posted 24 Jun 2010 Link to this post

    I have to make a static website, it cannot use a database.  My co-worker needs to modify menu.xml which loads the RadMenu menu items.  I want to make a managment panel that will allow them to modify items in the menu.xml, which will also export a sitemap.xml for search engines.

    My lead developer suggested looking to see if the RadMenu editor had a builder like the GUI design time builder that can be used at runtime, instead of creating something from scratch with a treeview.  Using VS object browser, there doesn't seem to be any method that can XML write out the tree structure of the RadMenu during runtime.  Am I overlooking something?  Can this be done with the RadMenu builder at runtime, or is it better to write something from scratch?

    Thanks in advance.
  2. Yana
    Admin
    Yana avatar
    5014 posts

    Posted 30 Jun 2010 Link to this post

    Hello Chris,

    Thank you for contacting Telerik support.

    I'm afraid that you cannot use the design time builder at runtime. Using RadTreeView for this is a good idea, you can use its drag-n-drop and edit functionality. Then you can use its GetXml() method to retrieve the current treeview structure in xml format:

    <Tree>
      <Node Text="North America" Expanded="True" Value="1">
        <Node>
           <Node>
           </Node>
        </Node>
      </Node>
    </Tree>

    You can use the same format for RadMenu only with XmlDataSource, because in this case you can set DataTextField, DataValueField and DataNavigateUrlField as explained here.

    Kind regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top