XMLdatasource

5 posts, 0 answers
  1. aabdan
    aabdan avatar
    26 posts
    Member since:
    Apr 2007

    Posted 13 Oct 2008 Link to this post

    Dear Telerik,

    I have this menu in xml file
    i need to implement it as XMLDatasource
    How i can do this ?
    Note : i try several method without solution
    it give me this error
    DataBinding: 'System.Web.UI.WebControls.XmlHierarchyData' does not contain a property with the name 'NavigateUrl'.

    <?

     

    xml version="1.0" encoding="utf-16"?>

     

    <

     

    Menu Skin="Red" EnableEmbeddedSkins="False" Style="left: 0px">

     

    <

     

    Group>

     

    <

     

    Item Text="Incoming">

     

    <

     

    Group>

     

    <

     

    Item Text="Incoming" NavigateUrl="Incoming/Income.aspx" />

     

    </

     

    Group>

     

    </

     

    Item>

     

    <

     

    Item Text="Outgoing">

     

    <

     

    Group>

     

    <

     

    Item Text="Outgoing" NavigateUrl="Outgoing/Outgoing.aspx" />

     

    </

     

    Group>

     

    </

     

    Item>

     

    <

     

    Item Text="Setup">

     

    <

     

    Group>

     

    <

     

    Item Text="Departments" NavigateUrl="Setup/Departments.aspx" />

     

    <

     

    Item Text="Managments" NavigateUrl="Setup/Managements.aspx" />

     

    <

     

    Item Text="Sections" NavigateUrl="Setup/Sections.aspx" />

     

    <

     

    Item Text="Subjects" NavigateUrl="Setup/Subjects.aspx" />

     

    <

     

    Item Text="Main Groups" NavigateUrl="Setup/MainGroups.aspx" />

     

    <

     

    Item Text="Branch Groups" NavigateUrl="Setup/BranchGroupsMain.aspx" />

     

    <

     

    Item Text="Incoming and Outgoing Method" NavigateUrl="Setup/InOutMethod.aspx" />

     

    </

     

    Group>

     

    </

     

    Item>

     

    <

     

    Item Text="Reports">

     

    <

     

    Group>

     

    <

     

    Item Text="Report Incoming And Outgoing" NavigateUrl="http://galaxyserver/ReportServer/Pages/Report.aspx?/ArchiveReportProject/ImportsReports_En&amp;rs:Command=Render" />

     

    <

     

    Item Text="Report Incoming and Outgoing Canceled" NavigateUrl="http://galaxyserver/ReportServer/Pages/Report.aspx?/ArchiveReportProject/ReportInOutCanceled_En&amp;rs:Command" />

     

    <

     

    Item Text="Report Outgoing With Incoming" NavigateUrl="http://galaxyserver/ReportServer/Pages/Report.aspx?/ArchiveReportProject/ReportOutWithIn_En&amp;rs:Command=Render" />

     

    <

     

    Item Text="Report Incoming With Outgoing" NavigateUrl="http://galaxyserver/ReportServer/Pages/Report.aspx?/ArchiveReportProject/ReportInWithOut_En&amp;rs:Command=Render" />

     

    <

     

    Item Text="Report Incoming Without Outgoing" NavigateUrl="http://galaxyserver/ReportServer/Pages/Report.aspx?/ArchiveReportProject/ReportInWithoutOut_En&amp;rs:Command=Render" />

     

    <

     

    Item Text="Report Outgoing Without Incoming" NavigateUrl="http://galaxyserver/ReportServer/Pages/Report.aspx?/ArchiveReportProject/ReportOutWithoutIn_En&amp;rs:Command=Render" />

     

    <

     

    Item Text="Report Internal Outgoing" NavigateUrl="http://galaxyserver/ReportServer/Pages/Report.aspx?/ArchiveReportProject/ReportInternalOut_En&amp;rs:Command=Render" />

     

    </

     

    Group>

     

    </

     

    Item>

     

    </

     

    Group>

     

    </

     

    Menu>


    Best Regards,
    Ahmad

     

  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 13 Oct 2008 Link to this post

    Hi LPW,

    Please check our online example: Declarative Data Sources


    Regards,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. aabdan
    aabdan avatar
    26 posts
    Member since:
    Apr 2007

    Posted 13 Oct 2008 Link to this post

    hi telerik
    yes i am try it but same problem
  5. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 16 Oct 2008 Link to this post

    Hi LPW,

    Since you have the <Group> tag in the XML file you need to use LoadContentFile() method instead of XMLDataSource:

    protected void Page_Load(object sender, EventArgs e) 
        RadMenu1.LoadContentFile("~/Menu2.xml"); 

    If you still need to use the XMLDataSource, you need to remove the <Group> tags from the xml file.

    I hope this helps.

    Sincerely yours,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. nick b-w
    nick b-w avatar
    8 posts
    Member since:
    Nov 2009

    Posted 04 Jan 2010 Link to this post

    you need to set an xpath for the datasource

    <asp:XmlDataSource
       ID="XmlDataSource1"
    runat="server"
    DataFile="~/App_Data/XmlDataSourceExample.xml" XPath="/Customers/Customer">
    </
    asp:XmlDataSource>  


    or programatically:

    XmlDataSource mysource = new XmlDataSource();
    d.XPath =  ("/Customers/Customer");
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017