Delegado ValueLocalizer
Un delegado que representa un método para localizar un valor de datos.
Espacio de nombres: Microsoft.SharePoint.JSGrid
Ensamblado: Microsoft.SharePoint (en Microsoft.SharePoint.dll)
Sintaxis
'Declaración
Public Delegate Function ValueLocalizer ( _
row As DataRow, _
value As Object _
) As String
'Uso
Dim instance As New ValueLocalizer(AddressOf HandlerMethod)
public delegate string ValueLocalizer(
DataRow row,
Object value
)
Parámetros
row
Tipo: System.Data.DataRowLa fila que contiene los datos que se va a localizar.
value
Tipo: System.ObjectEl valor que se va a localizar.
Valor devuelto
Tipo: System.String
String que representa el valor localizado.
Comentarios
El localizador determina cómo se representan los datos subyacentes en la pantalla.
//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
Consulte How to: Create a Basic JS Grid para obtener más información.