編輯

共用方式為


MetaColumn.Scaffold Property

Definition

Gets a value that indicates whether the data field should be displayed.

public:
 property bool Scaffold { bool get(); void set(bool value); };
public:
 virtual property bool Scaffold { bool get(); void set(bool value); };
public bool Scaffold { get; set; }
public virtual bool Scaffold { get; set; }
member this.Scaffold : bool with get, set
Public Property Scaffold As Boolean
Public Overridable Property Scaffold As Boolean

Property Value

true if the data field should be displayed; otherwise, false.

Remarks

The Scaffold property indicates whether a data field should be displayed when it is automatically generated by ASP.NET Dynamic Data. This property verifies if a ScaffoldColumnAttribute attribute is applied to the data field and returns the value of the ScaffoldColumnAttribute.Scaffold property. If a ScaffoldColumnAttribute attribute is not applied to the data field, Dynamic Data uses the following rules to determine whether to display the column:

  • If a UIHintAttribute attribute is applied to the data field, the data field is displayed. This rule overrides all the other rules.

  • If the value of the IsForeignKeyComponent property is true, the data field is not displayed. This occurs because Dynamic Data handles foreign-key fields in a different way and will not typically display the foreign-key field value.

  • If the value of the IsGenerated property is true, the data field is not displayed. Typically fields that are automatically generated in the database do not contain relevant information. Make sure that you apply the UIHintAttribute attribute to the data field, if the data field must be displayed.

  • If the value of the IsCustomProperty property is true, the data field is not displayed.

Applies to

See also