473,396 Members | 1,810 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,396 software developers and data experts.

Load chunk of xmldata in datagrid

Hi Guys,

I have a xml file, from which i want a node to be populated in a
datagrid. whats the easiest way to do this??

Here is a sample of xml file:

<?xml version="1.0" ?>
<script version="1.1">
<jobs>
<job name="Job1"/>
<job name="Job2"/>
</jobs>
<tables>
<table name="Table">
<columns>
<column name=Col1' />
<column name=Col2'/>
<column name=Col3'/>
</columns>
</table>
</tables>
</script>

Now, I want to populate the datagrid with
tables/table/columns/column@name..

Another question.. Can i add checkboxes in datagrid??

Thanks in advance..

Jul 13 '06 #1
2 1653
I would try and load the xml into a DataSet class. I think the function is
<<DataSetInstance>>.ReadXml().
This would probably give you a dataset with a number of tables
(jobs,job,tables,table,columns,column)
You might want to explicitly design the schema for the dataset in order to
have more control over the table creation. Once you have a Dataset you can
bind the required table to the Datagrid. Also, it is possible to have
checkboxes in a Datagrid, you'll have to look into template columns.
ta,
Andrew

<am************@gmail.comwrote in message
news:11**********************@35g2000cwc.googlegro ups.com...
Hi Guys,

I have a xml file, from which i want a node to be populated in a
datagrid. whats the easiest way to do this??

Here is a sample of xml file:

<?xml version="1.0" ?>
<script version="1.1">
<jobs>
<job name="Job1"/>
<job name="Job2"/>
</jobs>
<tables>
<table name="Table">
<columns>
<column name=Col1' />
<column name=Col2'/>
<column name=Col3'/>
</columns>
</table>
</tables>
</script>

Now, I want to populate the datagrid with
tables/table/columns/column@name..

Another question.. Can i add checkboxes in datagrid??

Thanks in advance..

Jul 17 '06 #2
Thanks Andrew for the response.. it was really helpful :)

Andrew Brook wrote:
I would try and load the xml into a DataSet class. I think the function is
<<DataSetInstance>>.ReadXml().
This would probably give you a dataset with a number of tables
(jobs,job,tables,table,columns,column)
You might want to explicitly design the schema for the dataset in order to
have more control over the table creation. Once you have a Dataset you can
bind the required table to the Datagrid. Also, it is possible to have
checkboxes in a Datagrid, you'll have to look into template columns.
ta,
Andrew

<am************@gmail.comwrote in message
news:11**********************@35g2000cwc.googlegro ups.com...
Hi Guys,

I have a xml file, from which i want a node to be populated in a
datagrid. whats the easiest way to do this??

Here is a sample of xml file:

<?xml version="1.0" ?>
<script version="1.1">
<jobs>
<job name="Job1"/>
<job name="Job2"/>
</jobs>
<tables>
<table name="Table">
<columns>
<column name=Col1' />
<column name=Col2'/>
<column name=Col3'/>
</columns>
</table>
</tables>
</script>

Now, I want to populate the datagrid with
tables/table/columns/column@name..

Another question.. Can i add checkboxes in datagrid??

Thanks in advance..
Jul 17 '06 #3

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

Similar topics

1
by: Sipayi | last post by:
'lo! Trying to use JAXB for my project. I did the following steps: a. Created xml/xsd/xjb, placed it under "com.foo.blah" b. xjc'd the xmls into "com.foo.blah.jaxb" c. Tried to unmarshal: --...
4
by: Stanley J Mroczek | last post by:
i got this far Sub getvin(ByVal sender As Object, ByVal e As System.EventArgs) Dim item As DataGridItem = CarGrid.Items(CarGrid.EditItemIndex) If (Not item Is Nothing) Then Dim txtVin As...
1
by: Rafaela K. Azinhal | last post by:
Hi, I'm a newbie and have a question: I have following PivotTable object in a HTML page <html> <body> <object class='ptdrillthrough' classid="clsid:0002E552-0000-0000-C000-000000000046"...
2
by: duncan | last post by:
Hi I an a mebie to XML / vb.net and I am struggling. I am developing a web base applcation using XML to link to its database so. Here is the XML I want to load into to a datagrid. The...
1
by: Soul | last post by:
Hi, I have a DataGrid which works. But if I load a new table to the DataGrid, it will still show those old data I load earlier. private void loadTableA() { if ( openFileDialog.ShowDialog()...
9
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
0
by: ameen.abdullah | last post by:
Hi Guys, I have a xml file, from which i want a node to be populated in a datagrid. whats the easiest way to do this?? Here is a sample of xml file: <?xml version="1.0" ?>
11
by: honguin | last post by:
Hi, With the following code, I have created a web request to a url which I am making a HTML POST with the html page request.htm, even though it makes a HTML POST, the StreamReader produces a XML...
2
elamberdor
by: elamberdor | last post by:
Hi All! Well, i'm modifying a dynamic map, with lat and long datapoints, my problem is it loads in text perfectly onto exact points I specify on the map, ..well now I want to load in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.