Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML dataset with GridView or DataView

Status
Not open for further replies.

llmclaughlin

Programmer
Aug 20, 2004
140
US
Hello,

I have a dataset that I populate from an xml file. This dataset has 10 tables, each table having one row of data. My question is, is it possible to load this into a grid or dataview with paging through each table. Right now when I bind it to either all I get is the first table in the dataset.

Any suggestions or better idea on how to display all the data from dataset

Thanks

Louie
 
You mean like:

//set i to the table you want to reference.
int i = 1;
gvMyGridView.DataSource = myDataSet.Tables;
gvMyGridView.DataBind();
 
I think he wants all of the tables represented in the datagrid at the same time.
 
Hmmm. That would be interesting.

In that case, the best solution would be to write the SQL so everything is in one table to begin with, but I suppose you could create an iterator object implementing IEnumerator and just bind to it.
 
I just ended up using the treeview and binding the datasource to the xml file, which works.


Thanks

Louie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top