Limit Columns shown from XML file

D

Devlei

My application reads data from an XML file into a Dataset, then via a
Dataview displays the data to the user in a datagrid. How do I only
show certain columns in the Datagrid? I have tried the TableStyle
property (and subsequent ColumnStyle) of the Datagrid, but the unwanted
columns still apear.

With SQL/OLE databases it was easy by simply using the SQL statement to
only fill the dataset with the required columns. But is there an
equivalent when reading an XML file?

With thanks
 
K

Ken Tucker [MVP]

Hi,

The tablestyle mapping name is wrong if all the column styles are
still being shown. Try setting the mapping name to the
dataset.table.tablename

Ken
 
D

Devlei

Thanks Ken, I will try that!!

Is that the only way to do it? Is it not possible to only read certain
columns from the XML file, or alternatively use the Dataview to only
read certain dataset columns?
 

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

Top