473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using xml source in datagrid -- possible with non-structured data?

Hi, is it possible to use a datagrid (read only) that has an xml source
that is NOT database-type structured? For example:

<assembly>
<work_order no="12345">
<station name="one">
<boards>
<board sn="111" start="10/23/03 11:30:12am"/>
<board sn="112" start="10/23/03 11:35:14am"/>
<board sn="113" start="10/23/03 11:40:16am"/>
</boards>
</station>
<station name="two">
<boards>
<board sn="111" start="10/23/03 12:30:12am"/>
<board sn="112" start="10/23/03 12:35:10am"/>
<board sn="113" start="10/23/03 12:40:15am"/>
</boards>
</station>
<station name="three">
<boards>
<board sn="111" start="10/24/03 08:10:10am"/>
<board sn="112" start="10/24/03 08:15:05am"/>
<board sn="113" start="10/24/03 08:20:30am"/>
</boards>
</station>
</work_order>
</assembly>

The datagrid report would look like:

Station SN Start
------------------------------------------
One 111 10/23/03 12:30:12am
------------------------------------------
One 112 10/23/03 11:35:14am
------------------------------------------
One 113 10/23/03 11:40:16am
------------------------------------------
Two 111 10/23/03 12:30:12am
------------------------------------------
Two 112 10/23/03 12:35:10am
------------------------------------------
etc.

If someone could point me to examples or explain a bit how to do this?

Thanks, Kat

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #1
3 1215
KatB wrote:
Hi, is it possible to use a datagrid (read only) that has an xml source
that is NOT database-type structured? For example:

<assembly>
<work_order no="12345">
<station name="one">
<boards>
<board sn="111" start="10/23/03 11:30:12am"/>
<board sn="112" start="10/23/03 11:35:14am"/>
<board sn="113" start="10/23/03 11:40:16am"/>
</boards>
</station>
<station name="two">
<boards>
<board sn="111" start="10/23/03 12:30:12am"/>
<board sn="112" start="10/23/03 12:35:10am"/>
<board sn="113" start="10/23/03 12:40:15am"/>
</boards>
</station>
<station name="three">
<boards>
<board sn="111" start="10/24/03 08:10:10am"/>
<board sn="112" start="10/24/03 08:15:05am"/>
<board sn="113" start="10/24/03 08:20:30am"/>
</boards>
</station>
</work_order>
</assembly>

The datagrid report would look like:

Station SN Start
------------------------------------------
One 111 10/23/03 12:30:12am
------------------------------------------
One 112 10/23/03 11:35:14am
------------------------------------------
One 113 10/23/03 11:40:16am
------------------------------------------
Two 111 10/23/03 12:30:12am
------------------------------------------
Two 112 10/23/03 12:35:10am
------------------------------------------
etc.

If someone could point me to examples or explain a bit how to do this?

Thanks, Kat

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Yes, if you read the XML into a dataset, it will infer a schema (table
structure) for you....check out this article about consuming an RSS feed
with a datagrid ASP.NET page...follow its principles of finding the
tables in the dataset:

http://aspnet.4guysfromrolla.com/articles/031903-1.aspx
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 17 '05 #2
Check out this article,
http://www.extremeexperts.com/Net/Ar...oDataGrid.aspx

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"KatB" <no****@comcast.net> wrote in message
news:ui**************@TK2MSFTNGP11.phx.gbl...
Hi, is it possible to use a datagrid (read only) that has an xml source
that is NOT database-type structured? For example:

<assembly>
<work_order no="12345">
<station name="one">
<boards>
<board sn="111" start="10/23/03 11:30:12am"/>
<board sn="112" start="10/23/03 11:35:14am"/>
<board sn="113" start="10/23/03 11:40:16am"/>
</boards>
</station>
<station name="two">
<boards>
<board sn="111" start="10/23/03 12:30:12am"/>
<board sn="112" start="10/23/03 12:35:10am"/>
<board sn="113" start="10/23/03 12:40:15am"/>
</boards>
</station>
<station name="three">
<boards>
<board sn="111" start="10/24/03 08:10:10am"/>
<board sn="112" start="10/24/03 08:15:05am"/>
<board sn="113" start="10/24/03 08:20:30am"/>
</boards>
</station>
</work_order>
</assembly>

The datagrid report would look like:

Station SN Start
------------------------------------------
One 111 10/23/03 12:30:12am
------------------------------------------
One 112 10/23/03 11:35:14am
------------------------------------------
One 113 10/23/03 11:40:16am
------------------------------------------
Two 111 10/23/03 12:30:12am
------------------------------------------
Two 112 10/23/03 12:35:10am
------------------------------------------
etc.

If someone could point me to examples or explain a bit how to do this?

Thanks, Kat

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #3
dim ds as new dataset
ds.readxml("c:\xmlsrc.xml")
it will work
use this ds as datasource for ur grid
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
by: Hallvard B Furuseth | last post by:
Now that the '-*- coding: <charset> -*-' feature has arrived, I'd like to see an addition: # -*- str7bit:True -*- After the source file has been converted to Unicode, cause a parse error if a...
2
by: Felix | last post by:
Is it possible to clone a datagrid? I've created a datagrid on my aspx page, editing various attributes, adding columns, etc. I would like to, in code, create an arbitrary number of these...
3
by: Maurice | last post by:
Hi Does anyone know how to set the source of a dtatagrid by means of a query and that the datagrid only shows the columns from the query. I have some code like this ...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
7
by: David Given | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have a project where I need to distribute 300kB of C source code as part of a shell script, and would like to compress it as much as possible. ...
2
by: Jason Coyne Gaijin42 | last post by:
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray...
17
by: OlafMeding | last post by:
Below are 2 files that isolate the problem. Note, both programs hang (stop responding) with hyper-threading turned on (a BIOS setting), but work as expected with hyper-threading turned off. ...
3
by: tshad | last post by:
I have someone at work starting to look at converting our 2002 projects to 2005 and had quite a few problems with the project. I thought you could use either 1 or 2 file (codebehind) method. ...
89
by: Cuthbert | last post by:
After compiling the source code with gcc v.4.1.1, I got a warning message: "/tmp/ccixzSIL.o: In function 'main';ex.c: (.text+0x9a): warning: the 'gets' function is dangerous and should not be...
7
by: GaryDean | last post by:
(one of our developers posted this and it got no answer so I'm giving it another try) I'm converting a DataGrid utility component that previously used the columns array to function as it has in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.