Is there a way to format a cell in a GridView?

S

S_K

Hi,

Is there anyway to format a cell such that it displays every number as
a floating point with both numbers to the right of the decimal
displayed irregardless of the number. For example the number 23.00
would be displayed as "23.00" rather than "23".

Any help out there?

Thanks so much
Steve
 
S

S_K

... and do not forget to set HtmlEncode to "false"

<asp:BoundField DataField="SomeNumber" DataFormatString="{0:N2}"
HtmlEncode=false/>

Regards,
Mykolahttp://marss.co.ua

Thanks!
That worked well!

Steve
 

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,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top