473,666 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1221
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******** ******@TK2MSFTN GP11.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
2208
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 non-u'' string contains a non-7bit source character. It can be used to ensure that the source file doesn't contain national characters that the program will treat as characters in the current
2
1710
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 datagrids. Any ideas? I thought that perhaps I should createa a separate "web user control". I added my datagrid to this control, I compiled, then I dragged the control to my aspx page. The control did not render in the designer.
3
275
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 Me.OleDbSelectCommand1.CommandText = "SELECT X, Y " & "FROM TABLE " & "WHERE TABLE. = 2 Me.OleDbSelectCommand1.Connection = Me.OleDbConnection Me.Dataset1.Clear( Me.OleDbDataAdapter1.Fill(Dataset1
121
10028
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 support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
7
1355
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. Does anyone know where I can get a (open source) tool for crunching C programs? That is, removal of whitespace, comments, extraneous characters, renaming identifiers to make them as short as possible, etc. Actual outright obfuscation is not my...
2
864
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 that has the information, but we as developers have no way to access this information. I have come up with a solution for the problem, (as I am sure many others have) using reflection. Here is some sample code that will print out the auto...
17
6409
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. Note, the Windows task manager shows 2 CPUs on the Performance tab with hyper-threading is turned on. Both Python 2.3.5 and 2.4.3 (downloaded from python.org) have this problem. The operating system is MS Windows XP Professional.
3
1177
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. But when I create a project, I can't seem to find a place to make that choice. Is there a place to make that choice when building a Web App? Also, when my friend tried to change the class name in the source file, the other files couldn't seem to...
89
6035
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 used." Could anybody tell me why gets() function is dangerous?? Thank you very much. Cuthbert
7
2028
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 the past without using the columns array. The reason for this is because it must process columns created at run time which does not create entries in the columns array..... My problem is that if datagrid columns created at design time are...
0
8444
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8869
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.