DataTable.Select Method (String, String, DataViewRowState)
Gets an array of all DataRow objects that match the filter in the order of the sort that match the specified state.
Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
member Select : filterExpression:string * sort:string * recordStates:DataViewRowState -> DataRow[]
Parameters
- filterExpression
- Type: System.String
The criteria to use to filter the rows. For examples on how to filter rows, see DataView RowFilter Syntax [C#].
- sort
- Type: System.String
A string specifying the column and sort direction.
- recordStates
- Type: System.Data.DataViewRowState
One of the DataViewRowState values.
To form the filterExpression argument, use the same rules for creating the DataColumn class's Expression property value. The Sort argument also uses the same rules for creating class's Expression strings.
If the column on the filter contains a null value, it will not be part of the result.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.