GetXML, DataSet and dataview

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I apply a dataview with a filter to a datagrid to remove rows that a
user does not want to see. However when I attempt to extract the data
from the underlying dataset using GetXML() the entire dataset is
returned. Is there a method of getting the XML from the dataview /
datagrid / dataset that applies the filter applied in the dataview?

Thanks in advance.
 
Hi,

You apply the dataview to the dataset, not to the grid. you place the
filters in the dataview as well as the sort criteria then you bind the grid
to this dataview

why are you using GetXML?

what is what you wanna do anyway?

cheers,
 
Yes apologies if that wasn't clear. I use a DataView for the purpose of
allowing my users to sort data in a data grid in a web based app. I want
to access the xml as I need to offer the ability to convert the data
grid to an excel spreadsheet. With the xml I can apply xslt for comma
delimited / tab delimited formatting and change the mime type then pipe
to excel.

Regards,

Chris
 
Hi,

I think it would be better if you convert the dataview to excel, not the
datagrid the grid is only meant to display data.. Now as you are aware
GetXml is not present in dataview so probably you will have to iterate and
process each row at a time.

Hope this help,
 
Thank you for your help. I am going to iterate through the dataview and
process on a row by row basis
 
Back
Top