Format Double Values using BoundColumn.DataFormatString

P

Prasad Dannani

Hi,

I have a Double Value. i am planning to display it in "0.0000" format i.e.
the decimals length is fixed i.e. 4.

I am using math.round function which is reducing the length to 4. but if the
length is just 2 digits then it is giving 2 digits only. where i want 4
digits.

Can anyone help me out. I done this functionality in visual basic but now i
want it for c#.net

Thanks in advance
Prasad Dannani
 
E

Elton Wang

Hi Prasad Dannani,

You can use DataFormatString="{0: ####0.0000}" in BoundColunm to format
output to 4 decimals.

HTH

Elton Wang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top