You need to sign in to do that
Don't have an account?
To diaplay String in comma seprated format
Hi All,
I have a string which contains the numberic values.I want to display the values with comma seperated.
eg: string value is : 20000,the visualforce page shuld render this as 20,000.
I tried using
<apex:outputText value="string: {0,Number,$#,###.##}">
<apex:param value="{!AccountBusinessDetails.PermCredLnAmt}" />
</apex:outputText>
for this value should be number do I aaded the folloeing statement in my controller class.
Decimal.valueof(AccountBusinessDetails.PermCredLnAmt);// this is out put from Webservice
I am getting error "Value should be a number/date/decimal format".
Any help is appreciated.
Thanks.
use Integer.valueOf()
Cool_D
If I keep the value in decimal ,on VF page for large numbers it displays the value in an Exponential format eg: 2.5E13 .So that is the reason I converted it into string ,but for String I am not able to format it as currency .
I think you can use "<apex:outputField>". that should render the number fields in the correct format!
Cool_D
<Apex:OutputField> can only be used with the sobject fields.The value I am trying to render is a result of webservice object,that is not created as a object in salesforce.
Well, in that case, why don't you use some string functions on the VF page itself, using which you can check the length of your string and add the "," appropriately!
Cool_D