This is a migrated thread and some comments may be shown as answers.

GetXML() gets only first level of menu

1 Answer 31 Views
Menu
This is a migrated thread and some comments may be shown as answers.
bydoga
Top achievements
Rank 1
bydoga asked on 04 Jan 2013, 11:33 AM
I am trying to cache RadMenu using GetXML() and LoadXML() but when i GetXML() is gets only first level 

<?xml version="1.0" encoding="utf-16"?>
<Menu EnableScreenBoundaryDetection="False" EnableOverlay="False" EnableRoundedCorners="True">
  <Group ExpandDirection="Down">
    <Item Value="1" ImageUrl="/Resources/Images/1.png" HoveredImageUrl="/Resources/Images/MasterPageImages/1_on.png" ExpandedImageUrl="/Resources/Images/MasterPageImages/1_on.png" BorderWidth="0px">
      <Group OffsetX="-98">
        <Item />
      </Group>
    </Item>
<Item Value="2" ImageUrl="/Resources/Images/2.png" HoveredImageUrl="/Resources/Images/MasterPageImages/2_on.png" ExpandedImageUrl="/Resources/Images/MasterPageImages/2_on.png" BorderWidth="0px">
      <Group OffsetX="-98">
        <Item /> // There is also RadMenuItem here i fill with InstantiateIn
      </Group>
    </Item>
</Menu>


public class SecondLevelMenuItemTemplate : ITemplate
        {
            public void InstantiateIn(Control container)
            {
var parentMenuItem = container as RadMenuItem;
// adding new RadMenuItem to parentMenuItem 
            }
        }

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 09 Jan 2013, 09:39 AM
Hello Doga,

In case anyone else is interested in getting an answer to your case, below I am pasting the few suggestions that I answered in the ticket that you opened:

I would suggest that you refer to the following demo and help articles that I believe would be very useful in your scenario:
Menu / XML Definition
Binding to Hierarchical DataSource Components
Use RadMenu in a user control with OutputCache enabled.


All the best,
Kate
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.
Tags
Menu
Asked by
bydoga
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or