SPField.Required property
取得或設定 Boolean 值,以決定是否使用者必須輸入一個值欄位New和Edit表單上。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Property Required As Boolean
Get
Set
'用途
Dim instance As SPField
Dim value As Boolean
value = instance.Required
instance.Required = value
public bool Required { get; set; }
Property value
Type: System.Boolean
true如果此欄位需要值 ;否則,請false。
Exceptions
Exception | Condition |
---|---|
NotSupportedException | 欄位是屬於清單為外部清單。 |