XmlDataSource with more than one root tab

2 posts, 1 answers
  1. Morten
    Morten avatar
    347 posts
    Member since:
    Jul 2012

    Posted 23 Apr 2009 Link to this post


    I want to use the same XML data source to load tabs in a RadTabStrip (used as the Menu on the page) and a RadTreeView (used as a SiteMap).

    The XML file must have one (and only one) root element . Unfortunately the root element is displayed in the RadTabStrip and because of that I can only have one root tab…

    The XML file looks like this:

    <?xml version="1.0" encoding="utf-8" ?>

    <Items Text="1" Url="">

      <Item Text="European cities" Url="" >

        <Item Text="Sofia" Url="http://en.wikipedia.org/wiki/Sofia" />

        <Item Text="Berlin" Url="http://en.wikipedia.org/wiki/Berlin" />

        <Item Text="Paris" Url="http://en.wikipedia.org/wiki/Paris" />



    I load the file like this:

    Dim x As New XmlDataSource

    x.DataFile = strVirtualFolder & "/xml/SiteMap_TelerikMenuTest.xml"



    m.DataTextField = "Text"

    m.DataNavigateUrlField = "Url"


    And my ASPX file:

    <telerik:RadTabStrip ID="m" UnSelectChildren="true" Skin="Office2007" runat="server" dir="ltr" CausesValidation="false" SelectedIndex="-1" >



    How can I have more than one ”root tab”?

  2. Answer
    Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 23 Apr 2009 Link to this post

    Hello Morten,

    You can check our online example which demonstrates how to have more than one root tab with XmlDataSource. Check the XPath property of the XmlDataSource.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top