Read only column type "price"

I need to display values in price format - “$35.97” and footer to display total ($(#stat_total)).
Issues (I use setNumberFormat(“0,000.00”,9,".",",")):

  1. I do not need price column to be editable, but to display “$” before it’s value - how to do it?
  2. I need values to display 2 decimal digits ($35.00), but it shows 1 digit if first is “0” ($35.0) - how to fix it?

thank you in advance

setNumberFormat() works only with “edn” or “ron” eXcell types

thank you Olga.
what about my second question:
2. I need values to display 2 decimal digits ($35.00), but it shows 1 digit if first is “0” ($35.0) - how to fix it?

If your 9th column has “ron” type, following code should work as expected:

grid.setNumberFormat("$0,000.00",9,".",",")

Yes it is column 9, but it returns 35.0 instead of 35.00 - second decimal zero is missing.
BTW it displays correctly 35.06, if second decimal digit is not a zero…
Another thing - “$” sign does not show (grid.setNumberFormat("$0,000.00",9,".",",")), should it?

thank you

It works at local example as expected. Please check sample here dhtmlx.com/docs/products/dht … ormat.html

Please double-check if column with “9” index has ‘ron’ type. Column indexes in grid is zero-based.

Olga, I use the pro basecode of 1+ year old, may be this is the issue -

  • the setNumberFormat works but does not display second decimal zero
  • setDateFormat("%m/%d/%Y") does not work at all - it ignores this setting. I included all needed calendar libraries… The xml values for dhxCalendar column is “d/m-%Y” (almost like in the example you referred ["%d/%m-%Y"]).

Any hints?
Thx.

What version of dhtmlxGrid do you use? All this issues are not reproducible at the current version.

v. 2.5 build 91111

Please try to update your files. Similar issue was fixes at the latest version of dhtmlxGrid