Visual Basic: DataGrid Control

NumberFormat Property

See Also   Example   Applies To

Returns or sets a value indicating the format string for the Column object of a DataGrid control.

Syntax

object**.NumberFormat** [**=**value]

The NumberFormat property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A string expression that defines how the expression in the Value property is formatted. The default value is a zero-length string ("").

Remarks

The Text property of the Column object is derived by applying this format to the Value property of the Column object. If NumberFormat is set to an invalid string, data in the cells are displayed as #ERR# and the value set in the Value property remains unchanged. See the Format function for information about valid format strings.