XML as a datasource

P

Paul Speranza

Aside from reading XM:L into a dataset and populating a datagrid is there
any way to have a grid bind right to XML. I have seen the data girds in
Powerbuilder do this.


Regards,
Paul Speranza
 
Y

Yan-Hong Huang[MSFT]

Hello Paul,

Using the DataSet, we can manipulate the data through code, or we can use data binding to connect the data to controls in
our user interface (UI). Once the data is in a DataSet, there's no difference in behavior regardless of whether it came from
Microsoft SQL Server or an XML document. This is powerful because it means that we can load data from a table and save it
to an XML file, or we can load data from an XML file and store it to a table in a database.

I don't think there is any way to bind datagrid to a XML file directly without involving dataset. For how to use XML data in
ADO.NET, there is one good article named "ADO.NET and XML: Two Great Tastes That Go Great Together".
http://msdn.microsoft.com/library/en-us/dnadvnet/html/vbnet06252002.asp?frame=true

Hope that helps.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: "Paul Speranza" <[email protected]>
!Subject: XML as a datasource
!Date: Fri, 1 Aug 2003 17:54:38 -0400
!Lines: 9
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <#[email protected]>
!Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
!NNTP-Posting-Host: 12-243-233-123.client.attbi.com 12.243.233.123
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.datagridcontrol:5970
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
!
!Aside from reading XM:L into a dataset and populating a datagrid is there
!any way to have a grid bind right to XML. I have seen the data girds in
!Powerbuilder do this.
!
!
!Regards,
!Paul Speranza
!
!
!
 
P

Paul Speranza

Yan-Hong

Thanks for the reply. That is what I expected and it makes sense. Using the
dataset gives us a consistent model regardless of the source.

Regards,

Paul Speranza

Yan-Hong Huang said:
Hello Paul,

Using the DataSet, we can manipulate the data through code, or we can use
data binding to connect the data to controls in
our user interface (UI). Once the data is in a DataSet, there's no
difference in behavior regardless of whether it came from
Microsoft SQL Server or an XML document. This is powerful because it means
that we can load data from a table and save it
to an XML file, or we can load data from an XML file and store it to a table in a database.

I don't think there is any way to bind datagrid to a XML file directly
without involving dataset. For how to use XML data in
ADO.NET, there is one good article named "ADO.NET and XML: Two Great
Tastes That Go Great Together".
 

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,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top