RowFilter Property

DataView.RowFilter Property

 

Gets or sets the expression used to filter which rows are viewed in the DataView.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

abstract RowFilter : string with get, set
override RowFilter : string with get, set

Property Value

Type: System.String

A string that specifies how rows are to be filtered. For more information, see the Remarks section.

To form a RowFilter value, specify the name of a column followed by an operator and a value to filter on. The value must be in quotation marks. For example:

"LastName = 'Smith'"

See the Expression property of the DataColumn class for more information.

To return only those columns with null values, use the following expression:

"Isnull(Col1,'Null Column') = 'Null Column'"

The following example creates a DataView and sets its RowFilter property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft