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

What is the difference between DataRow and DataRowView

P: n/a
ad
What is the difference between DataRow and DataRowView?
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Well, a DataRow is a row in a DataTable, while a DataRowView is a row
in a DataView. So, the question becomes, what is the difference between
a DataTable and a DataView?

A DataView provides a different look into a DataTable. It is, if you
will a "false front"... a "façade" in front of a DataTable. The
DataTable holds the real data... the DataView looks just like the data
table, but allows you to do things to the data.

For example, you can ask your DataView to present only some of the
DataRows in your DataTable and not others. Or, you can ask it to
present the DataRows sorted in a particular order. You can't sort the
DataRows in a DataTable, but you can ask a DataView on a DataTable to
return its DataRowViews in a particular order. So, the DataView makes
it look as though the DataTable is sorted (when it really isn't).

In short, if you want to see (in a list view, for example, or a
DataGrid) the rows in a DataTable in a certain way, plunk a DataView
overtop of the data table and display the DataRowViews, instead of
displaying DataRows directly.

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.