format string on gridView boundField

Posted on 2006-06-05
Last Modified: 2008-01-09
What is the correct dataformat string to display a number with exactly two numbers after the decimal point, with a percent sign after it, ie,

Question by:ARACK04
    LVL 16

    Accepted Solution

    LVL 27

    Assisted Solution

    I think you have to have htmlencode="false" in order to accomplish the format
    <asp:boundfield datafield="YourColumName" dataformatstring="{0:0.00%}" htmlencode="false" />

    Good luck
    LVL 12

    Assisted Solution

    also set applyformateditmode true if needed

    keep html encoding to true unles you are embeding html tags - false is unsafe.
    % formating is set with P

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now