Comments/Troubleshooting

In most cases, the DataView is used with ASP.NET or Windows Forms data binding, as described in Chapter 12. However, you can also use a DataView when programmatically modifying or manipulating a subset of data from a DataTable. In this case, you can access each row in the DataView through a DataRowView object. The DataRowView is a view on a single row and is similar to the DataRow class, with an overloaded indexer that allows you to retrieve column values by name or index number.

Warning

The DataRowView doesn’t provide any ability to customize the formatting of individual values. To apply custom formatting, you may need to handle data binding events, as described in Chapter 12.

Get ADO.NET in a Nutshell 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.