Monday, March 14, 2011

Format currency in GridView

Set the DataFormatString property of the Gridview field to:

{0:C}

This will format the DataField at position 0 (in the array) to a currency value.

A decimal value of 99.0000 will be formatted to $99.00





Also see: FormatCurrency Function

No comments:

Post a Comment