Data Binding To XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?SmltSGVhdmV5?=

    #1

    Data Binding To XML

    I went thru wizard to bind my XML dataset to my GridView control and after
    completing the responses my grid will not render. I get the following error
    msg "The data source for the GridView1 did not have any properties or
    attributes from which to generate the columns. I have never created or used
    and XML file, so it would appear that my XML file is not set up correctly
    althought VS did not complain. Here is a snipit of my XML file...

    <?xml version="1.0" encoding="utf-8" ?>
    <Programs>
    <ProgramName>PG 00I005</ProgramName>
    <Description> PF Key Processor</Description>
    <Location>../Attachments/Specs/PG00I005.doc</Location>
    <Status>Activ e</Status>
    </Programs>

    Here is the code generated by the wizard....

    <asp:GridView ID="GridView1" runat="server" DataSourceID="M asterProgramLis t">
    </asp:GridView>
    <asp:XmlDataSou rce ID="MasterProgr amList" runat="server" DataFile="~/XML
    DataSources/MasterProgramLi st.xml"
    OnTransforming= "MasterProgramL ist_Transformin g"></asp:XmlDataSour ce>

    So why does it not like my XML file or is that the real problem?


  • =?Utf-8?B?SmltSGVhdmV5?=

    #2
    RE: Data Binding To XML

    Thanks, that was very helpful!!


    Comment

    Working...