DataGrid support for XML with different node types

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: magister (yurps_at_yahoo.co.uk)
Date: 11/03/04


Date: 3 Nov 2004 05:46:11 -0800

Hello,

I have xml like this....

<test>
<question>sdfsa</question>
<section><question>43ga</question>
<question>asdf</question>
</test>

I make and xsd file with
<xs:all>
<xs:element....
<xs:element....
</xs:all>

I then bind the XML to a DataGrid...

DataGrid.DataSource = DataSet;
DataGrid.DataBind();

but I only get the questions, I notice there is a DataMember property
I can set to DataGrid.DataMember = "Section"; and I will get that one,
but essential I want a table with both elements in there...

Is there anyway to do this...?

Thank You



Relevant Pages

  • Re: Populate datagrid from XML
    ... reading xml into dataset in the first place. ... populate rows in datagrid explicitly other than binding it to dataset. ... bind it to the datagrid. ... > This web service was simply calling a COM coponent that is already in use. ...
    (microsoft.public.dotnet.languages.csharp)
  • dataset.Databind error when dataset XML contains attributes...
    ... I've come accross an interesting problem populating an asp.net datagrid. ... I am trying to bind ... XML data to a datagrid as I've done in countless other applications, ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Datagrid.databind error when dataset XML contains attributes...
    ... I've come accross an interesting problem populating an asp.net datagrid. ... I am trying to bind ... XML data to a datagrid as I've done in countless other applications, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Binding XML to Datagrid
    ... > I tried to bind an XML similar to the following to a datagrid. ... > 'Idontwant' node is not an option of mine. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • DataGrid support for XML with different node types
    ... I make and xsd file with ... I then bind the XML to a DataGrid... ...
    (microsoft.public.dotnet.xml)