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

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.