DataTableExtensions.AsDataView Method (DataTable)
Creates and returns a LINQ-enabled DataView object.
Assembly: System.Data.DataSetExtensions (in System.Data.DataSetExtensions.dll)
Usage NoteIn Visual Basic and C#, you can call this method as an instance method on any object of type DataTable. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
DataView enables data-binding scenarios for LINQ to DataSet and can be created from a typed or untyped DataTable, providing a default view of that table. Filtering and sorting can be set on the DataView after it has been created from a DataTable. The DataView is then bound to a UI control, such as a DataGrid or a DataGridView, providing a simple data binding model.
For more information and examples, see Creating a DataView Object (LINQ to DataSet).
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.