ValueLocalizer delegate

A delegate representing a method to localize a data value.

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

public delegate string ValueLocalizer(
	DataRow row,
	Object value


Type: System.Data.DataRow

The row that contains the data to localize.

Type: System.Object

The value to localize.

Return value

Type: System.String
A String representing the localized value.

The Localizer determines how we render the underlying data on screen.

//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;

Refer to How to: Create a Basic JS Grid for more information.