Populating Menu with XML Tree

2 posts, 0 answers
  1. mtberk
    mtberk avatar
    1 posts
    Member since:
    Apr 2009

    Posted 03 Oct 2011 Link to this post


    <Tree AllowNodeEditing="True" SingleExpandPath="True" CheckChildNodes="True" EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="True" OnClientNodeClicking="DontClick" DataNavigateUrlField="NavigateUrl" AppendDataBoundItems="True" DataTextField="Text" DataValueField="Text" Skin="WebBlue" EnableAjaxSkinRendering="False" Height="382px" Width="300px" DataSourceID="XmlDataSource1">
      <Node Text="Menu item With SubMenu" Value="menu with submenu" NavigateUrl="~/somelink">
        <Node Text="submenuitem" Value="submenuitem" NavigateUrl="~/item" />

    I have an xml structure like above. This structure is created in a different page by drag-dropping from 2 dynamic treeviews.

    My problem is
    1. I want to have some "Menu with Submenu" items where I don't want a navigate url. I don't want my page to navigate to a url when the user clicks on that item. How should I change the structure of the xml for that?

    2. I'm generating it in a different page by drag-drop. I drag an item from a different treeview to this one to design the menu and serialize it as this xml. Is there any way to put a different property to the node identify it as "Menuitem without navigate url"

    3. I want to put a context menu on my TreeView. Any samples.

    I'm quite new to Telerik and I couldn't find a fix for my problems by a small search. I would appreciate for a sample or documentation.

  2. Kate
    Kate avatar
    1898 posts

    Posted 05 Oct 2011 Link to this post

    Hello Mtberk,

    Straight to your questions:

    To answer your first and second question I believe that the following help article and demo will be very useful:

    Considering your last question - I want to put a context menu on my TreeView. Any samples.
    RadTreeView has its own built-in ContextMenu that you can use. You can read more about it in the following help article:

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top