PC Review


Reply
Thread Tools Rate Thread

Changing the Data in an XML Dataset

 
 
Atley
Guest
Posts: n/a
 
      19th May 2004
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


 
Reply With Quote
 
 
 
 
Eric Lemmon
Guest
Posts: n/a
 
      19th May 2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Atley
Guest
Posts: n/a
 
      19th May 2004
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-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      19th May 2004
> 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


 
Reply With Quote
 
Atley
Guest
Posts: n/a
 
      19th May 2004
How do I assign the dataview to the DataGrid?



"Cor Ligthert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> > 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
>
>



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      19th May 2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy large data from one dataset to another dataset mina Microsoft VB .NET 1 1st Sep 2009 08:19 PM
Error when changing data value in strongly typed dataset table? Keithb Microsoft ASP .NET 1 25th Oct 2006 10:52 AM
Changing Repeater ItemTemplate details based on data from dataset Mike Microsoft ASP .NET 1 4th Feb 2006 08:32 AM
Unable to cast object of type 'System.Data.DataSet' to Typed DataSet Optimus Microsoft VB .NET 1 31st Jan 2006 06:26 AM
Changing data in a dataset Ferdinand Zaubzer Microsoft C# .NET 1 7th Dec 2005 03:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:22 PM.