Share via


ValueLocalizer-Delegat

Ein Delegat, eine Methode darstellt, einen Datenwert zu lokalisieren.

Namespace:  Microsoft.SharePoint.JSGrid
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Delegate Function ValueLocalizer ( _
    row As DataRow, _
    value As Object _
) As String
'Usage
Dim instance As New ValueLocalizer(AddressOf HandlerMethod)
public delegate string ValueLocalizer(
    DataRow row,
    Object value
)

Parameter

Rückgabewert

Typ: System.String
Ein String , das den lokalisierten Wert darstellt.

Hinweise

Der Lokalisierungsexperten bestimmt, wie wir die zugrunde liegenden Daten auf dem Bildschirm gerendert.

//Add properties based on the type
                if (dc.DataType == typeof(String))
                {
                    gf.PropertyTypeId = "String";
                    /*
                    gf.Localizer = (ValueLocalizer)delegate(DataRow row, object toConvert)
                    {
                        return toConvert.ToString();
                    };
                    /*The Serialization type is a required property */
                    gf.SerializeLocalizedValue = true;
                    gf.SerializeDataValue = false;
                }
'Add properties based on the type
                If dc.DataType Is GetType(String) Then
                    gf.PropertyTypeId = "String"
                   
                    'gf.Localizer = CType(Function(row As DataRow, toConvert As Object) toConvert.ToString(), ValueLocalizer)
                    'The Serialization type is a required property 
                    gf.SerializeLocalizedValue = True
                    gf.SerializeDataValue = False
                End If

How to: Create a Basic JS Grid Weitere Informationen finden Sie unter.

Siehe auch

Referenz

Microsoft.SharePoint.JSGrid-Namespace