I am trying to load a content file into the menu using LoadContentFile but keep getting an error. I downloaded the latest exe on the 19/032008 with the TelerikWeb.UI.dll version beeing 2007.3.1425.35.
I have succesfully got this working with the old controls so I know the method works but just cant get it to work with the new Prometheus menu control.
My code is as follows:
Menu Control:
<telerik:RadMenu ID="rmTopMenu" runat="server" Skin="Outlook"></telerik:RadMenu>
Code behind:
rmTopMenu.LoadContentFile("~/Auth/Common/Controls/Menus/Contents/DefaultMenu.xml");
XML Structure:
<?xml version="1.0" encoding="utf-8" ?>
<Menu>
<Group Flow="Horizontal">
<Item Text="Item 1"></Item>
<Item Text="Item 2"></Item>
<Item Text="Item 3"></Item>
</Group>
</Menu>
Error Message:
System.InvalidOperationException: <Group xmlns=''> was not expected.
Any ideas on this would be much appreciated.
Thanks
Craig
6 Answers, 1 is accepted

Dont know if that is not allowed in Prometheus, worked in the old controls as used it to hide menu items from the drop down but used it to build a breadcrumb by looping through the menu items.
Cheers
Craig

<PanelItems xmlns=''> was not expected.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.InvalidOperationException: <PanelItems xmlns=''> was not expected.
Source Error:
|
_____________________________
here is the code...
Protected
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.radNavigation.LoadContentFile("~/Navigation.xml")
End Sub
Here is my XML file Navigation.xml
<?
xml version="1.0" encoding="utf-8" ?>
<
PanelItems>
<
PanelItem Value="mnuProData" Text="Process Data" Expanded="True" runat="server">
<
PanelItem Value="mnuProData1" Text="Upload Data" Target="mainFrame" runat="server" NavigateUrl="UploadData.aspx"></PanelItem>
<
PanelItem Value="mnuProData2" Text="Review Data" Target="mainFrame" runat="server" NavigateUrl="ModifyData.aspx"></PanelItem>
</
PanelItem>
<
PanelItem Value="mnuProcAct" Text="Processing Activities" runat="server">
<
PanelItem Value="mnuProcAct1" Text="Processing Activities" Target="mainFrame" runat="server" NavigateUrl="ViewTotals.aspx"></PanelItem>
<
PanelItem Value="mnuProcAct2" Text="Processing Activities" Target="mainFrame" runat="server" NavigateUrl="GenerateElections.aspx"></PanelItem>
</
PanelItem>
<
PanelItem Value="mnuReports" Text="Reports" runat="server">
<
PanelItem Value="mnuReports1" Text="Merit Reports" Target="mainFrame" runat="server" NavigateUrl="MCReportViewer.aspx?rep=merit"></PanelItem>
<!--
<PanelItem Value="mnuReports2" Text="District Totals" Target="mainFrame" runat="server" NavigateUrl="DCReportViewer.aspx?rep=disttotals"></PanelItem>-->
</
PanelItem>
<!--
<PanelItem Value="mnuMHelp" Text="Help" runat="server">
<PanelItem Value="mnuContents" Text="Contents" Target="webHelp" runat="server"></PanelItem>
<PanelItem Value="mnuSupport" Text="Support" Target="mainFrame" runat="server"></PanelItem>
<PanelItem Value="mnuFeedback" Text="Feedback" Target="mainFrame" runat="server"></PanelItem>
</PanelItem>
<PanelItem Value="mnuAdministration" Text="Administration" runat="server">
<PanelItem Value="mnuSendEMail" Text="Send EMail" NavigateUrl="SendEMail.aspx" Target="mainFrame" runat="server"></PanelItem>
<PanelItem Value="mnuUserAdmin" Text="Add/Modify Users" NavigateUrl="UserAdmin.aspx" Target="mainFrame" runat="server"></PanelItem>
<PanelItem Value="mnuFHLBankAdmin" Text="Modify Entity" NavigateUrl="FHLBankAdmin.aspx" Target="mainFrame" runat="server"></PanelItem>
<PanelItem Value="mnuApplicationSettings" Text="Application Settings" NavigateUrl="AppSettings.aspx" Target="mainFrame" runat="server"></PanelItem>
</PanelItem>
-->
</
PanelItems>
Please make sure that the XML file conforms to the structure described in this help topic:
RadPanelBar Items > Loading Items from XML
Best wishes,
Veskoni
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center


Please find below the updated link:
Loading Items from XML
Regards,
Helen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.