Export (0) Print
Expand All

DisplayAttribute.Order Property

Gets or sets a value that indicates the order in which columns are sorted.

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

public int Order { get; set; }

Property Value

Type: System.Int32
A value that indicates the order in which columns are sorted.

ExceptionCondition
InvalidOperationException

The get accessor is called when the Order property has not been set.

Columns are sorted in increasing order based on the Order property. Negative values are allowed and can be used to place a column before all other columns. If this property is not set, the presentation layer will determine the order to display the column.

Use the GetOrder method to retrieve the value of the Order property. The GetOrder method returns null if the Order property has not been set, but the get accessor of the Order property throws an InvalidOperationException if the value 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