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

XML Source for Menu - What about Separators?

8 Answers 185 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Tommy
Top achievements
Rank 1
Tommy asked on 22 Jun 2009, 03:05 PM

If you create a menu, you are given the ability to create separators which come across as class="rmSeparator" in the html, but if you link your menu to an xml datasource, you lose this ability... how do you add separators if you are linking to an xml datasource?

XML Example without separators below:

<?xml version="1.0" encoding="utf-8" ?> 
<Items Text="">  
  <Item Text="Visitors" Url="" Level="Lvl1" > 
    <Item Text="Event Calendar" Url="#" Level="Lvl2" /> 
    <Item Text="City Road Map" Url="#" Level="Lvl2" /> 
    <Item Text="Contact Us" Url="#" Level="Lvl2" /> 
    <Item Text="Historic Preservation" Url="#" Level="Lvl2" /> 
    <Item Text="Interactive Maps" Url="#" Level="Lvl2" /> 
    <Item Text="Latest News" Url="#" Level="Lvl2" /> 
    <Item Text="Ocala Municipal Arts Commission" Url="#" Level="Lvl2" /> 
    <Item Text="Security &amp; Hurricane Information" Url="#" Level="Lvl2" /> 
  </Item> 
.....

Do you add them to the XML somehow??

8 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 23 Jun 2009, 06:36 AM
Hello Tommy,

You can easily add the separator in XML file as shown below.

XML:
 
  . . . 
<Item Text="Visitors" Url="" Level="Lvl1" > 
    <Item Text="Event Calendar" Url="#" Level="Lvl2" /> 
    <Item Text="City Road Map" Url="#" Level="Lvl2" /> 
    <Item Text="Contact Us" Url="#" Level="Lvl2" /> 
    <Item Text="Historic Preservation" Url="#" Level="Lvl2" /> 
    <Item Text="Interactive Maps" Url="#" Level="Lvl2" /> 
    <Item IsSeparator="True"  Text="-" /> 
    <Item Text="Latest News" Url="#" Level="Lvl2" /> 
    <Item Text="Ocala Municipal Arts Commission" Url="#" Level="Lvl2" /> 
    <Item Text="Security &amp; Hurricane Information" Url="#" Level="Lvl2" /> 
</Item> 
  . . . 
Checkout the following link to know more about this:
Loading Items from XML

Thanks,
Shinu.
0
Tommy
Top achievements
Rank 1
answered on 23 Jun 2009, 02:05 PM
Well that sort of works as it still wants to highlight the seperator as a link and it also is needing a url in the xml for the seperator. This example is from the hierarchial xml demo, using the xml datasource control.  Seems like it's missing some functionality doing it this way, but I can view the menu in the design view which is nice.

So I went through the links in the help section you provided and found the other way, where you bypass using the xmldatasource control, instead use the vb codebhind to bind the menu with a properly formatted xml file, which does work better but has it's own caveats as well, like the menu doesn't show up in the design view since the page has to load for vb codebehind to work, but I can get the seperators to work .. unfortunately does not show up in designview.  Took me awhile to figure out how to link them until I tried Href instead of URL in the xml.
    Private Sub Page_Load(ByVal sender As ObjectByVal e As EventArgs) Handles MyBase.Load  
        If Not Page.IsPostBack Then 
            RadMenu1.LoadContentFile("~/App_Data/mainnav2.xml")  
        End If 
    End Sub 

<?xml version="1.0" encoding="utf-8" ?> 
<Menu> 
  <Group> 
    <Item Text="File" > 
      <Group> 
        <Item Text="New" Href="http://www.test.com">  
          <Group> 
            <Item Text="Open" /> 
            <Item Text="Open" /> 
            <Item Text="Open" /> 
            <Item Text="Open" /> 
          </Group> 
        </Item> 
        <Item Text="Open" /> 
        <Item IsSeparator="True" /> 
        <Item Text="Save" /> 
        <Item Text="Save As" /> 
        <Item IsSeparator="True" /> 
        <Item Text="Print Preview" /> 
        <Item Text="Print" /> 
        <Item IsSeparator="True" /> 
        <Item Text="Close" /> 
      </Group> 
    </Item> 
.....

So, the only way i have found where I can retain all the functionality of the RadMenu, see it in design view, and easily update it from one source (in a GUI as well) was to create user control (mainnav.ascx file) for the main nav and then just insert it whereever I want.  This gives me the full functionality for the radmenu skins and attributes, as well as can be seen in design view.

Do you see any troubles with doing it this way? I know XML once it's loaded is supposed to be in memory and fast, but this seems to be ok to me. Thoughts? Issues? :)

Thanks for your time!
TT


0
Jhanzaib Tariq
Top achievements
Rank 2
answered on 17 Jun 2010, 12:40 PM

Hi Support,

I have used similar options but facing an error. See attached image for more detail.

Regards,
Jhan Zaib
0
Yana
Telerik team
answered on 18 Jun 2010, 01:23 PM
Hi Jhanzaib Tariq,

Could you please send us your xml file so that we can test it? Thanks

Best wishes,
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
0
Jhanzaib Tariq
Top achievements
Rank 2
answered on 21 Jun 2010, 11:44 AM

Hi Yana,

See attached file, which I have used.

<?xml version="1.0" encoding="utf-8" ?> 
<Items Text=""
  <Item Text="Home" Url="~/Index.aspx" ></Item
  <Item Text="Products  ▼" Url="~/Products.aspx"
 
    <Item Text ="Document Signing &amp; Verification" Url="~/Products/Document-Signing.aspx"
      <item Text="ADSS PDF Server" Url="~/Products/ADSS-Server.aspx"></item> 
      <item Text="ADSS XML Server" Url="~/Products/ADSS-Server.aspx"></item> 
      <item Text="ADSS PKCS#7 Server" Url="~/Products/ADSS-Server.aspx"></item> 
      <!-- <item Text="PDF Signer Server" Url="~/Products/PDFSignerServer.aspx"></item> 
      <item Text="XML Signer Server" Url="~/Products/XMLSignerServer.aspx"></item> 
      <item Text="File Signer Server" Url="~/Products/FileSignerServer.aspx"></item> 
    --> 
      <item Text="ADSS GoSign Applet" Url="~/Products/ADSS-GoSign-Applet.aspx"></item> 
      <item Text="ADSS Client SDK" Url="~/Products/ADSS-Client-SDK.aspx"></item> 
      <item Text="PDF Sign&amp;Seal (desktop)" Url="~/Products/PDF-Sign-Seal.aspx"></item> 
      <item Text="File Sign&amp;Seal (desktop)" Url="~/Products/File-Sign-Seal.aspx"></item> 
    </Item> 
 
    <Item Text ="e-ID Validation" Url="~/Products/eID-Validation.aspx"
      <!-- <item Text="ADSS Infrastructure Server" Url="~/Products/ADSSInfrastructureServer.aspx"></item>
    --> 
      <item Text="ADSS OCSP Server" Url="~/Products/ADSS-OCSP-Server.aspx"></item> 
      <item Text="ADSS XKMS Server" Url="~/Products/ADSS-XKMS-Server.aspx"></item> 
      <item Text="ADSS SCVP Server" Url="~/Products/ADSS-SCVP-Server.aspx"></item> 
      <item Text="ADSS CA Server" Url="~/Products/ADSS-CA-Server.aspx"></item> 
      <!-- <item Text="TrustFinder Decryption Server" Url="~/Products/TrustFinderDecryptionServer.aspx"></item> --> 
    </Item> 
 
 
    <Item Text ="Timestamping &amp; Long-term Archiving" Url="~/Products/Timestamp-Archive.aspx"
      <item Text="ADSS TSA Server" Url="~/Products/ADSS-TSA-Server.aspx"></item> 
      <item Text="ADSS Archive Server" Url="~/Products/ADSS-Archive-Server.aspx"></item> 
    </Item> 
 
 
    <Item Text ="Approval Workflows" Url="~/Products/Approval-Workflows.aspx"
      <item Text="Ascertia Docs" Url="~/Products/Ascertia-Docs.aspx"></item> 
      <item Text="ADSS Secure Email Server" Url="~/Products/ADSS-Secure-Email-Server.aspx"></item> 
      <item Text="ADSS Auto File Processor" Url="~/Products/ADSS-Auto-File-Processor.aspx"></item> 
      <item Text="ADSS Gateway" Url="~/Products/ADSS-Gateway.aspx"></item> 
 
      <!-- <item Text="GoSign for Sharepoint" Url="~/Products/GoSign4sharepoint.aspx"></item> --> 
    </Item> 
 
    <Item Text ="e-Trust Clients &amp; Tools" Url="~/Products/eID-Validation.aspx"
      <item Text="CRL Monitor" Url="~/Products/CRL-Monitor.aspx"></item> 
      <item Text="OCSP Monitor" Url="~/Products/OCSP-Monitor.aspx"></item> 
      <item Text="OCSP Client Tool" Url="~/Products/OCSP-Client-Tool.aspx"></item> 
    <item Text="ARP OCSP Plug-in" Url="~/Products/Advanced-Revocation-Provider.aspx"></item> 
      <item Text="OCSP Crusher" Url="~/Products/OCSP-Crusher.aspx"></item> 
      <item Text="TSA Crusher" Url="~/Products/TSA-Crusher.aspx"></item> 
      <item Text="ADSS Client SDK" Url="~/Products/ADSS-Client-SDK.aspx"></item> 
     <!-- <item Text="ADSS Server Test Tool" Url="~/Products/ADSSServerTestTool.aspx"></item> --> 
    </Item> 
    <Item IsSeparator="True"  Text="-" /> 
    <Item Text ="All Server Products" Url=""
      <item Text="ADSS Server" Url="~/Products/ADSS-Server.aspx"></item> 
      <item Text="ADSS Archive Server" Url="~/Products/ADSS-Archive-Server.aspx"></item> 
      <item Text="ADSS CA Server" Url="~/Products/ADSS-CA-Server.aspx"></item> 
      <item Text="ADSS Gateway Server" Url="~/Products/ADSS-Gateway.aspx"></item> 
      <item Text="ADSS OCSP Server" Url="~/Products/ADSS-OCSP-Server.aspx"></item> 
      <item Text="ADSS PDF Server" Url="~/Products/ADSS-Server.aspx"></item> 
      <item Text="ADSS PKCS#7 Server" Url="~/Products/ADSS-Server.aspx"></item> 
      <item Text="ADSS Secure Email Server" Url="~/Products/ADSS-Secure-Email-Server.aspx"></item> 
      <item Text="ADSS SCVP Server" Url="~/Products/ADSS-SCVP-Server.aspx"></item> 
      <item Text="ADSS TSA Server" Url="~/Products/ADSS-TSA-Server.aspx"></item> 
      <item Text="ADSS XKMS Server" Url="~/Products/ADSS-XKMS-Server.aspx"></item> 
      <item Text="ADSS XML Server" Url="~/Products/ADSS-Server.aspx"></item> 
      <item Text="Ascertia Docs" Url="~/Products/Ascertia-Docs.aspx"></item> 
    </Item> 
 
    <Item Text ="All Desktop Products" Url=""
      <item Text="ADSS Auto File Processor" Url="~/Products/ADSS-Auto-File-Processor.aspx"></item> 
      <item Text="ADSS Client SDK" Url="~/Products/ADSS-Client-SDK.aspx"></item> 
      <item Text="ADSS Gateway Server" Url="~/Products/ADSS-Gateway.aspx"></item> 
      <item Text="ADSS GoSign Applet" Url="~/Products/ADSS-GoSign-Applet.aspx"></item> 
      <item Text="ARP OCSP Plug-in" Url="~/Products/Advanced-Revocation-Provider.aspx"></item> 
      <item Text="CRL Monitor" Url="~/Products/CRL-Monitor.aspx"></item> 
      <item Text="File Sign&amp;Seal (desktop)" Url="~/Products/File-Sign-Seal.aspx"></item> 
      <item Text="OCSP Client Tool" Url="~/Products/OCSP-Client-Tool.aspx"></item> 
      <item Text="OCSP Crusher" Url="~/Products/OCSP-Crusher.aspx"></item> 
      <item Text="OCSP Monitor" Url="~/Products/OCSP-Monitor.aspx"></item> 
      <item Text="PDF Sign&amp;Seal (desktop)" Url="~/Products/PDF-Sign-Seal.aspx"></item> 
      <item Text="TSA Crusher" Url="~/Products/TSA-Crusher.aspx"></item> 
    </Item> 
    <Item IsSeparator="True"  Text="-" /> 
    <item Text="Product Quotation &amp; Feedback" Url="~/Products/ProductQuotations.aspx"></item> 
 
  </Item> 
  <Item Text="Solutions  ▼" Url="~/Solutions.aspx"
    <Item Text ="Solutions by Technology" Url="~/Solutions/ByTechnology.aspx"
      <item Text="e-ID Validation &amp; e-Signature Verification" Url="~/Solutions/ByTechnology/eidValidation.aspx"></item> 
      <item Text="e-Invoice, e-Billing, e-Statements" Url="~/Solutions/ByTechnology/eInvoice.aspx"></item> 
      <item Text="e-Tendering, e-Submissions &amp; Secure Web Form Uploads" Url="~/Solutions/ByTechnology/e-Tendering.aspx"></item> 
      <item Text="e-Document Approval &amp; Workflow" Url="~/Solutions/ByTechnology/e-DocumentApproval.aspx"></item> 
      <item Text="e-Notarisation &amp; Secure Archiving" Url="~/Solutions/ByTechnology/e-Notarization.aspx"></item> 
      <item Text="Email Signing, Verification &amp; Archiving" Url="~/Solutions/ByTechnology/e-mailSigning.aspx"></item> 
      </Item> 
    <Item Text ="Solutions by Industry" Url="~/Solutions/ByIndustry.aspx"
      <item Text="Government &amp; Defence" Url="~/Solutions/ByIndustry/Government.aspx"></item> 
      <item Text="Banking, Finance &amp; Insurance" Url="~/Solutions/ByIndustry/Finance.aspx"></item> 
      <item Text="Manufacturing &amp; Engineering" Url="~/Solutions/ByIndustry/Engineering.aspx"></item> 
      <item Text="Life Sciences and Healthcare" Url="~/Solutions/ByIndustry/Healthcare.aspx"></item> 
      <item Text="Corporate / Enterprise &amp; Human Resources" Url="~/Solutions/ByIndustry/Corporate.aspx"></item> 
      <item Text="Legal, Real Estate &amp; Consultancy" Url="~/Solutions/ByIndustry/Realestate.aspx"></item> 
    </Item> 
    <item Text="Solutions Quotations &amp; Feedback" Url="~/Solutions/SolutionQuotation.aspx"></item> 
 
  </Item> 
 
  <Item Text="Support  ▼" Url="~/Support.aspx"
    <item Text="Submit a Ticket" Url="~/helpdesk.aspx?action=submit"></item> 
    <item Text="View a Ticket" Url="~/helpdesk.aspx?action=view"></item> 
    <item Text="Live Chat" Url="~/Support.aspx"></item> 
    <item Text="Knowledgebase" Url="~/Support/knowledgebase.aspx?Category=All+Articles"></item> 
    <item Text="Hot Topics" Url="~/Support/blogs.aspx"></item> 
    <item Text="Support Services Guide" Url="~/Downloads/pdfs/AscertiaSupportServices.pdf"></item> 
    <item Text="Support Feedback" Url="~/Support/SupportFeedback.aspx"></item> 
    <item Text="Request a Demo" Url="~/Support/DemoRequest.aspx"></item> 
  </Item> 
 
  <Item Text="Downloads" Url="~/Downloads.aspx"
  </Item> 
 
 
  <Item Text="Resources" Url="~/Resources/Document-Signing-Verification.aspx"
  </Item> 
 
   
  <Item Text="Company  ▼" Url="~/Company.aspx"
    <Item Text="About Us" Url="~/Company.aspx" /> 
    <Item Text="News and Events" Url="~/Company/News.aspx" /> 
    <Item Text="Partners" Url="~/Company/OurPartners.aspx" /> 
    <Item Text="Contact Us" Url="~/Company/Contact.aspx" /> 
  </Item> 
 
  <Item Text="Certificate Center" Url="~/OnlineCA/default.aspx"></Item> 
 
  <Item Text="Live Demos" Url="http://www.globaltrustfinder.com" Target="_blank" ></Item
</Items> 
 


Regards
Jhan Zaib
0
Yana
Telerik team
answered on 23 Jun 2010, 03:36 PM
Hi Jhanzaib,

You should set "Url" for all the items, it's missing for the first item:

<?xml version="1.0" encoding="utf-8" ?>
<Items Text="" Url="#">
  <Item Text="Home" Url="~/Index.aspx" ></Item>
...

All the best,
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
0
Jhanzaib Tariq
Top achievements
Rank 2
answered on 23 Jun 2010, 04:15 PM
Hi Yana,

I have set the URL but now separator not showing properly. See attached screenshot. 
Kindly respond ASAP.

Regards,
Jhan Zaib
0
Yana
Telerik team
answered on 25 Jun 2010, 03:00 PM
Hello Jhan Zaib,

Could you please open a support ticket and send us a simple page demonstrating the issue as we're not able to reproduce it? Thanks

Greetings,
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
Tags
Menu
Asked by
Tommy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Tommy
Top achievements
Rank 1
Jhanzaib Tariq
Top achievements
Rank 2
Yana
Telerik team
Share this question
or