jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Formatting of negative values using "c2" is wrong
This topic contains 5 replies, has 3 voices, and was last updated by Hristo 7 years, 5 months ago.
-
Author
-
We have a grid with a column displaying currency. Having used the localizestrings method to set the correct currency symbol, I’ve got the values in the column to display as desired by setting the column’s cellsformat property to “c2”, except where the values are negative. If a value is negative, it is displayed as £-123.45 when it should be -£123.45 (i.e. with the negative sign before the currency symbol). I realise that ‘wrong’ is a subjective word, but Excel places the negative symbol before the currency symbol and that makes it a pretty widely-accepted standard. I assume this is not something I can correct myself but would require an update to the source code?
Hello philipstratford,
Thank you for this feedback. We will discuss this.
You could achieve this bycellsrenderer
callback and you should miss ‘cellsformat’ option and do it this manually.
There you could manually change set how to looks the currency value.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo,
We are facing the same issue , we tried the cellsrenderer , but title of the columns does not reflect the value with dollar amount if we remove the cellsFormat = c2, if we keep both cellsrenderer & cellsformat then value in grid shows properly -$12 but title show $-12. which is wrong. Please suggest some easy way or fix this in you API or provide some customformating function.
Thanks,
AshvaniHello Ashvani,
You mean the header of the columns.
Could you clarify it, what you mean by “title show $-12”?
Also, it will be better if it is possible to provide us an example.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi,
title , I Mean tooltip on columns when you hover on column it still shows $-12.
Thanks,
AshvaniHello Ashvani,
You could override the Tooltip and its content, too.
Please, take a look at this topic:
https://www.jqwidgets.com/community/topic/grid-tooltip/#post-46399Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.