The DataTable Versus DataView

On the outside, a DataTable and DataView are identical in structure. They are both made up of columns and rows. The difference between the two objects is how they are derived. A DataView is derived from a DataTable and is a customized view of that DataTable. At a high-level, a DataTable can be compared to a table from a database and a DataView can be compared to a SQL View.

One or more DataViews can be created from a single DataTable and each one of the DataViews can have rows edited, updated, deleted, filtered, and searched. As previously mentioned, both the DataView and DataTable are constructed of columns and rows and in this chapter those are the two pieces we will be concentrating on. Both the DataTable and ...

Get Programming Data-Driven Web Applications with ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.