Rock.Web.UI.Controls.RockBoundField.FormatDataValue C# (CSharp) Method

FormatDataValue() protected method

Formats the specified field value for a cell in the T:System.Web.UI.WebControls.BoundField object.
protected FormatDataValue ( object dataValue, bool encode ) : string
dataValue object The field value to format.
encode bool true to encode the value; otherwise, false.
return string
        protected override string FormatDataValue( object dataValue, bool encode )
        {
            if (dataValue is string && TruncateLength > 0)
            {
                return base.FormatDataValue( ( (string)dataValue ).Truncate( TruncateLength ), encode );
            }

            return base.FormatDataValue( dataValue, encode );
        }