Efficient ways to Append a DataTable with XML

R

Ryan Ternier

I have a XML File in the format:

<ItemTypes>
<Item TypeID="1">
<Field Type="Status" Hidden="False"></Field>
<Field Type="Goal" Hidden="False"></Field>
...
</Item>
</ItemTypes>
....

The list of Item Types can go on forever. I am trying to load this in a
DataGrid so users can see the Field description, type etc. and can
change the "Hidden" attribute of it (True or False).

My program needs to take all the Fields from the DB, store them in a
DataTable. Then grab all of these fields from a XML File, and append the
same data table, then bind it to a Data Grid. On this DataGrid there
will be a column with CheckBoxes in it so users can "hide" that field
from different items (hence the hidden attribute).

My initial thoughts were to grab the data from the DB, Fill the
DataTable with it, then run a loop going through each Item Type,
appending each field to it.

IS using the xmlTextReader the most efficient way of doing this?

When the page is loaded, I just need to spit everything out onto the
page. But then when the user submits it, I have to re-write the
attributes of the XML file to match the checkbox (un-checked, or checked).


Thanks in advance.


/Rternier
Code monkey
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top