Freigeben über


EditableAttribute.AllowInitialValue Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets a value that indicates whether users should be able to set a value for the property when adding a new record in the data set.

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

Syntax

'Declaration
Public Property AllowInitialValue As Boolean
public bool AllowInitialValue { get; set; }

Property Value

Type: System.Boolean
true if users should be able to set the value; otherwise, false. The default value is the value you set for the AllowEdit property.

Remarks

The AllowEdit property indicates whether users should be allowed to change the existing value of a property. The AllowInitialValue property indicates whether users should be allowed to set a value for the property when inserting a new record. Setting either property to false does not functionally prevent the value from being edited or set to an initial value. You use this attribute to communicate to the client application how the property should be handled.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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