473,394 Members | 1,769 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,394 software developers and data experts.

Will a row added to a DataView automatically be added to the underlying DataTable?

If I add a row to a DataView, will the row automatically be added to the
underlying DataTable? If so, I'm trying to understand why anyone would add
a row to a DataView when they may as well just add it to the DataTable. A
DataView is just a perspective on a DataTable anyway, right? I mean a
DataView doesn't actually hold any data.

Thanks,
Ron
Jul 7 '07 #1
1 1343
Ron,

Think that you can have a reference to a dataview, however not to the
datatable. You have instanced a datatable in a method, than it is easier to
use the dataview, (It is even more usable as you use a currencymanager )

A little bit pseudo code bellow

Public sub1 ()
dim dt as new datatable
dim dv as dataview()
mydatagrid.datasource = dv
End sub 1

Public sub2
(directcast (mydatagrid.datasoure, dataview).Add(whatever)
End sub 2

Cor

"Ronald S. Cook" <rc***@westinis.comschreef in bericht
news:eZ**************@TK2MSFTNGP06.phx.gbl...
If I add a row to a DataView, will the row automatically be added to the
underlying DataTable? If so, I'm trying to understand why anyone would
add a row to a DataView when they may as well just add it to the
DataTable. A DataView is just a perspective on a DataTable anyway, right?
I mean a DataView doesn't actually hold any data.

Thanks,
Ron


Jul 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ruslan | last post by:
Hello, I have: BindingManagerBase bm;
2
by: Hananiel | last post by:
Using Dataview as a datasource for datagrid works fine while viewing. When I make a new row, by calling dataview.AddNew(), it removes all the rows in the grid. Anyone know whats going on? In any...
0
by: Ryan | last post by:
Is there a way to get a row's DataView index from the underlying DataTable index. Example DataTable (sorted by key - 1st column) DataView (sorted by second column) Row 0 - A, 2 ...
6
by: Joe | last post by:
I have a DataView and would like to extract data from it and write it to a ListView. Can I only accomplish this with the DataViewRows Object array? Is there a way forme to enumerate through the...
5
by: Richard | last post by:
Windows Forms, csharp, 20 rows in DataTable 14 shown in view after filter applied. For any of the 14 how do I do the datarow or something else thing to access the data in the row of the table...
36
by: kjvt | last post by:
Based on a prior posting, I've written a function to convert a recordset to a dataview. The first call to the function for a given recordset works perfectly, but the second call always returns a...
3
by: astro | last post by:
I have a datagrid that is two levels down from the dataview (i.e. grandchild). I have spent 3 hours trying to get the syntax of determining it's real datasource (i.e. not it's source based on it's...
1
by: amber | last post by:
If I set a dataview to equal a table in a dataset, then filter that dataview, how can I reflect this back into my dataset? TIA, Amber
3
by: hzgt9b | last post by:
Using VS2005, VB.NET, I know that I can use a DataView to constrain what rows are "seen" from the underlying datatable - is it also possible to use a DataView to constrain what columns/attributes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.