SPFieldFile.GetFieldValueForClientRender method
將欄位型別值轉換成使用於用戶端顯示、 編輯及新增項目表單中的物件。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Overrides Function GetFieldValueForClientRender ( _
item As SPItem, _
mode As SPControlMode _
) As Object
'用途
Dim instance As SPFieldFile
Dim item As SPItem
Dim mode As SPControlMode
Dim returnValue As Object
returnValue = instance.GetFieldValueForClientRender(item, _
mode)
public override Object GetFieldValueForClientRender(
SPItem item,
SPControlMode mode
)
參數
item
Type: Microsoft.SharePoint.SPItem物件,包含此類型的欄位的值。
mode
Type: Microsoft.SharePoint.WebControls.SPControlMode值,這個值指定是否傳回的物件應該要適合顯示表單或編輯表單或新的表單。
傳回值
Type: System.Object
物件,包含在mode所指定的表單中呈現的用戶端所使用的欄位值的表示。
備註
這個覆寫會傳回Dictionary<TKey, TValue> (特別是,字典 < 字串、 物件 >),可以轉換成 JSON 傳遞至用戶端側邊呈現執行階段的顯示模式。在編輯模式中,這個覆寫傳回的字串 (可能是空的),並在所有其他模式方法,它可以傳回,並將空字串。