Mono Class Library: System.Web.UI.WebControls.BoundColumn Overview | Members

System.Web.UI.WebControls.BoundColumn.DataFormatString Property

This property gets or sets the formatting structure of the data displayed on a column

[System.ComponentModel.DefaultValue("")]
public virtual string DataFormatString { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

You can set the display format at your will.

Each argument can be reached as {<n>}. Where n is the number of the argument. It's normal to set n to 0 (first argument). This is because a column has only one argument and 0 is the first and the only one.

The format of the argument comes when you add :Xnn to the n number, in the form {0:F2}. This will try to show the argument as a fixed point number with two decimal places.

The meaning of each formatting parameter shows here:

ColumnDescription
CCurrency format
DDecimal format
EExponential format
FFixed format
GGeneral format
NNumeric format
XHexadecimal format
GGeneral format

DataFormatString=<a href={0}>link<a> Will display the string as a link

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0