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

XmlDataSource with more than one root tab

1 Answer 90 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Morten asked on 23 Apr 2009, 02:07 PM

Hi,

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" />

  </Item>

</Items>

I load the file like this:

Dim x As New XmlDataSource

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

 

 

m.DataTextField = "Text"

m.DataNavigateUrlField = "Url"

m.DataBind()

And my ASPX file:

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

    </telerik:RadTabStrip>

 

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 23 Apr 2009, 02:09 PM
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.

Regards,
Albert
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.
Tags
TabStrip
Asked by
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Atanas Korchev
Telerik team
Share this question
or