Changing the Data in an XML Dataset

  • Thread starter Thread starter Atley
  • Start date Start date
A

Atley

I want to edit the source of a Dataset I have set up using the Data Forms
wizard.

Is there a way to either filter the data to get the subset I want or to
change the recordsource of the Dataset all together?

btw this is in VB in VS.net 2003
 
Hi Atley,

Are you referring to the XSD file? That is the schema definition file, so
it just describes the DataSet's schema. No data is contained in it.

It sounds like you want to use a DataView. Just set the Table property of
the DataView to the DataTable in the DataSet. You can then use the
DataView's RowFilter and Sort properties to get your data subset. Also, you
can change the DataSource/DisplayMember properties of your bound controls to
the DataView instead of the DataTable.

DataView.RowFilter Property:
http://msdn.microsoft.com/library/d...rlrfsystemdatadataviewclassrowfiltertopic.asp

DataView.Sort Property
http://msdn.microsoft.com/library/d...tml/frlrfsystemdatadataviewclasssorttopic.asp

Take care,

Eric
 
What I am trying to do is get a variable subset of a table's data to show up
in a grid ready for editing...

What is the best way to do that?
 
What I am trying to do is get a variable subset of a table's data to show
up
in a grid ready for editing...

What is the best way to do that?

There is in VB.net no overall best way, however the way Eric told you is a
very good one for your question.

Just my thought,

Cor
 
How do I assign the dataview to the DataGrid?



Cor Ligthert said:
show

There is in VB.net no overall best way, however the way Eric told you is a
very good one for your question.

Just my thought,

Cor
 
Hi Atley,

Eric as well as me did give an answer on your question some rows above to
resti, however it is nothing more than (with a windowsform)
\\\
dim dv as new dataview(ds.tables(0))
dv.rowfilter ............' if you need that
dv.sort ...............' if you need that
datagrid1.datasource = dv
///
I hope this helps

Cor
 
Back
Top