D
D. Shane Fowlkes
I have a couple of fields in SQL Server which are defined as "Money". One is
"Quantity" and the other is "Unit Price". Unit Price I can understand being
defined as "money" but I'm not sure why the DBA defined QTY as money.
Changing the datatype to Integer in the database isn't an option here so I'm
hoping someone can present a workaround.
In a datagrid, the data in the fields is written to the aspx page as
"1.0000" even though only "1" is stored in the database. Using a DataGrid
that's bound to a DataSet, how can I format the output to the page so that
QTY just shows as "1" AND Unit Price shows as "$1.00"? Thanks!!
<asp:BoundColumn HeaderText="Quantity" DataField="Quantity"
ItemStyle-Width="10%" ItemStyle-CssClass="caption" />
<asp:BoundColumn HeaderText="Unit Price" DataField="UnitPrice"
ItemStyle-Width="15%" ItemStyle-CssClass="caption" />
"Quantity" and the other is "Unit Price". Unit Price I can understand being
defined as "money" but I'm not sure why the DBA defined QTY as money.
Changing the datatype to Integer in the database isn't an option here so I'm
hoping someone can present a workaround.
In a datagrid, the data in the fields is written to the aspx page as
"1.0000" even though only "1" is stored in the database. Using a DataGrid
that's bound to a DataSet, how can I format the output to the page so that
QTY just shows as "1" AND Unit Price shows as "$1.00"? Thanks!!
<asp:BoundColumn HeaderText="Quantity" DataField="Quantity"
ItemStyle-Width="10%" ItemStyle-CssClass="caption" />
<asp:BoundColumn HeaderText="Unit Price" DataField="UnitPrice"
ItemStyle-Width="15%" ItemStyle-CssClass="caption" />