Export (0) Print
Expand All

DisplayAttribute.AutoGenerateFilter Property

Gets or sets a value that indicates whether filtering is automatically displayed for this field.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

public bool AutoGenerateFilter { get; set; }

Property Value

Type: System.Boolean
true if filtering is automatically displayed; otherwise, false.

ExceptionCondition
InvalidOperationException

The property does not contain a value when trying to retrieve the value.

You set the AutoGenerateFilter property to explicitly override the default behavior of the presentation layer. For example, if a control automatically generates user-interface elements that include filtering capabilities, you can use this property to disable filtering for particular fields.

Use the GetAutoGenerateFilter method to retrieve the value of the AutoGenerateFilter property. The GetAutoGenerateFilter method returns null if the AutoGenerateFilter property has not been set, but the get accessor of the AutoGenerateFilter property throws an exception if the property is not set.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft