Y
yefei
I want to display a BoundField "Price" in the format of currency in a
GridView
I set the DataFormatString="{0:C}" in my program
However, it doesnot work.
I try to add a '$'in from of the brace, it shouw things like
"$2500.0000"
my data in the database is of 'decimal' with length=9
even i do this in the gridview, 'edit column' functionality, it is
still the same
but I can achieve this by converting the field to a template field
it is easy to do this if the 'Price' column is static
however, i need to add the 'Price" column dynamically by creating
BoundFields and add it according to some conditions.
So anybody knows the right ways to specify the DataFormatString?
Or it cannot apply to BoundField and i have to do it using
TemplateField, which is much more complicated?
need your help
GridView
I set the DataFormatString="{0:C}" in my program
However, it doesnot work.
I try to add a '$'in from of the brace, it shouw things like
"$2500.0000"
my data in the database is of 'decimal' with length=9
even i do this in the gridview, 'edit column' functionality, it is
still the same
but I can achieve this by converting the field to a template field
it is easy to do this if the 'Price' column is static
however, i need to add the 'Price" column dynamically by creating
BoundFields and add it according to some conditions.
So anybody knows the right ways to specify the DataFormatString?
Or it cannot apply to BoundField and i have to do it using
TemplateField, which is much more complicated?
need your help