Data Binding To XML

G

Guest

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>PG00I005</ProgramName>
<Description>PF Key Processor</Description>
<Location>../Attachments/Specs/PG00I005.doc</Location>
<Status>Active</Status>
</Programs>

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

<asp:GridView ID="GridView1" runat="server" DataSourceID="MasterProgramList">
</asp:GridView>
<asp:XmlDataSource ID="MasterProgramList" runat="server" DataFile="~/XML
DataSources/MasterProgramList.xml"
OnTransforming="MasterProgramList_Transforming"></asp:XmlDataSource>

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top