DataFormatString does not format
Currency and datetime fields are not formatted properly. A disconnected database is built and BoundField columns are created in a GridView. DataFormatStrings of {0:C} and {0:d} are used respectively. But the currency fields are given four decimal places (the default in that SQL type of field) and the time is also unexpectedly included in the date field. The MSDN says in order to work the parent object containing the BoundFields must be ReadOnly. But the GridView does not have that property so it was set in the BoundFields themselves. Something is suppressing the correct functioning of DataFormatString. What can be doing that?
|