![]() |
|
|
|
#1 |
|
Howdy,
In my GridView i have some bound columns displaying currency. I have DataFormatString="${0:C2}" in one of the columns but the value being displayed is $35 . If the price has cents, then it will display the cents, like $35.3 or $35.55, but where there's no cents, it just displays $35. Shouldn't this override any datatypes from the datasource. Just to cofirm I am sending a valid datatype, I checked everything out and this gridview is being loaded from a arraylist of a class. The class has the following property, which is even formatted there but it doens't matter... Public ReadOnly Property Price() As Double Get Return FormatNumber(_price, 2) End Get End Property Thanks!! -- David Lozzi dlozzi@(remove)delphi-ts.com www.delphi-ts.com David Lozzi |
|
|
|
|
#2 |
|
Posts: n/a
|
For some reason i have yet to understand you have to set the HTMLEncode
property to false or the DataFormatString is basically ignored. "David Lozzi" wrote: > Howdy, > > In my GridView i have some bound columns displaying currency. I have > DataFormatString="${0:C2}" in one of the columns but the value being > displayed is $35 . If the price has cents, then it will display the cents, > like $35.3 or $35.55, but where there's no cents, it just displays $35. > Shouldn't this override any datatypes from the datasource. Just to cofirm I > am sending a valid datatype, I checked everything out and this gridview is > being loaded from a arraylist of a class. The class has the following > property, which is even formatted there but it doens't matter... > > Public ReadOnly Property Price() As Double > > Get > > Return FormatNumber(_price, 2) > > End Get > > End Property > > Thanks!! > > -- > David Lozzi > dlozzi@(remove)delphi-ts.com > www.delphi-ts.com > > > > =?Utf-8?B?Y2xpY2tvbg==?= |
|
|
|
#3 |
|
Posts: n/a
|
Wow, why does that make sense?!?
Thanks for the help! -- David Lozzi dlozzi@(remove)delphi-ts.com www.delphi-ts.com "clickon" <> wrote in message news:6ADABBAB-A64D-439F-9BCE-... > For some reason i have yet to understand you have to set the HTMLEncode > property to false or the DataFormatString is basically ignored. > > "David Lozzi" wrote: > >> Howdy, >> >> In my GridView i have some bound columns displaying currency. I have >> DataFormatString="${0:C2}" in one of the columns but the value being >> displayed is $35 . If the price has cents, then it will display the >> cents, >> like $35.3 or $35.55, but where there's no cents, it just displays $35. >> Shouldn't this override any datatypes from the datasource. Just to cofirm >> I >> am sending a valid datatype, I checked everything out and this gridview >> is >> being loaded from a arraylist of a class. The class has the following >> property, which is even formatted there but it doens't matter... >> >> Public ReadOnly Property Price() As Double >> >> Get >> >> Return FormatNumber(_price, 2) >> >> End Get >> >> End Property >> >> Thanks!! >> >> -- >> David Lozzi >> dlozzi@(remove)delphi-ts.com >> www.delphi-ts.com >> >> >> >> David Lozzi |
|
|
|
#4 |
|
Posts: n/a
|
AFAIK it is a bug.
Kenan Kilictepe "David Lozzi" <> wrote in message news:... > Wow, why does that make sense?!? > > Thanks for the help! > > -- Kenan Kilictepe |
|
![]() |
| Thread Tools | Search this Thread |
|
|