By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,654 Members | 1,422 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,654 IT Pros & Developers. It's quick & easy.

Changing the Data in an XML Dataset

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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/de...iltertopic.asp

DataView.Sort Property
http://msdn.microsoft.com/library/de...ssorttopic.asp

Take care,

Eric

"Atley" <at*****@homtmail.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
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

Nov 20 '05 #2

P: n/a
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?
"Eric Lemmon" <E_********************@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
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/de...iltertopic.asp
DataView.Sort Property
http://msdn.microsoft.com/library/de...ssorttopic.asp
Take care,

Eric

"Atley" <at*****@homtmail.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
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


Nov 20 '05 #3

P: n/a
> 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
Nov 20 '05 #4

P: n/a
How do I assign the dataview to the DataGrid?

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:ux**************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #5

P: n/a
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
Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.