473,785 Members | 2,325 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataFormatStrin g="${0:C2}"

Howdy,

In my GridView i have some bound columns displaying currency. I have
DataFormatStrin g="${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(_p rice, 2)

End Get

End Property

Thanks!!

--
David Lozzi
dlozzi@(remove) delphi-ts.com
www.delphi-ts.com

Aug 8 '06 #1
3 7566
For some reason i have yet to understand you have to set the HTMLEncode
property to false or the DataFormatStrin g is basically ignored.

"David Lozzi" wrote:
Howdy,

In my GridView i have some bound columns displaying currency. I have
DataFormatStrin g="${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(_p rice, 2)

End Get

End Property

Thanks!!

--
David Lozzi
dlozzi@(remove) delphi-ts.com
www.delphi-ts.com

Aug 8 '06 #2
Wow, why does that make sense?!?

Thanks for the help!

--
David Lozzi
dlozzi@(remove) delphi-ts.com
www.delphi-ts.com
"clickon" <cl*****@discus sions.microsoft .comwrote in message
news:6A******** *************** ***********@mic rosoft.com...
For some reason i have yet to understand you have to set the HTMLEncode
property to false or the DataFormatStrin g is basically ignored.

"David Lozzi" wrote:
>Howdy,

In my GridView i have some bound columns displaying currency. I have
DataFormatStri ng="${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(_p rice, 2)

End Get

End Property

Thanks!!

--
David Lozzi
dlozzi@(remove) delphi-ts.com
www.delphi-ts.com


Aug 9 '06 #3
AFAIK it is a bug.

Kenan Kilictepe

"David Lozzi" <dl****@nospam. nospamwrote in message
news:e5******** ******@TK2MSFTN GP04.phx.gbl...
Wow, why does that make sense?!?

Thanks for the help!

--

Aug 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.