473,396 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Changing the Data in an XML Dataset

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
5 1147
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
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
> 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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: G-Fit | last post by:
Hello group, I have several servers hosting SQL databases. On each of them, I have several databases. All those databases have the same structure (even those on different servers), only the data...
7
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
10
by: Marizel | last post by:
I'm not sure there's an easy solution to this, but thought I'd ask. I often find myself with a query which I'd like to reuse, but with a different datasource. These datasources generally have...
2
by: John Smith | last post by:
Hey folks, I've got a combobox (DropDown List) in a windows form application which is bound to a DataSet. It's value is set to a numeric ID. It's visible text is set to a date. I need to make...
3
by: Doug | last post by:
Hi I have the following code (not mine) that populates a datagrid with some file names. But I want to replace the datagrid with a combo box. private void OnCurrentDataCellChanged(object sender,...
7
by: Dan Sikorsky | last post by:
How do you iterate thru a dataset to change money fields to a different value? Here's what I have. My dataset is filled directly from a stored procedure. ' Create Instance of Connection and...
1
by: Mike | last post by:
Hello all, Is there a way to change the ItemTemplate based on the data that is being shown? For instance, I have a dataset, contains two fields (NAME, STATE). I want to show all the records...
6
by: nagar | last post by:
My application connects to a SQLite db and gets a number of fields which are displayed in a list though a typed dataset. I need to manually update an unbound column (which contains the index of...
6
by: John | last post by:
Hi I have a winform db app that is "bound" to a dataset...via data adpater, binding source and all that. As this is a multi-user app I need to refill dataset from time to time so the newest data...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.