BoundColumn.FormatDataValue(Object) 方法

定义

将指定的值转换为 DataFormatString 属性指示的格式。Converts the specified value to the format indicated by the DataFormatString property.

protected:
 virtual System::String ^ FormatDataValue(System::Object ^ dataValue);
protected virtual string FormatDataValue (object dataValue);
abstract member FormatDataValue : obj -> string
override this.FormatDataValue : obj -> string
Protected Overridable Function FormatDataValue (dataValue As Object) As String

参数

dataValue
Object

要格式化的值。The value to format.

返回

String

已转换为由 DataFormatString 属性指示的格式的指定值。The specified value converted to the format indicated by the DataFormatString property.

注解

使用 FormatDataValue 方法可将指定的值转换为属性指示的格式 DataFormatStringUse the FormatDataValue method to convert the specified value to the format indicated by the DataFormatString property.

备注

如果未设置该属性,则此方法返回值的等效字符串 DataFormatStringThis method returns the string equivalent of the value if the DataFormatString property is not set.

适用于

另请参阅