How to use comma as decimal separator?

Hi,

Only the dot seams to be supported in the grid. Is there a way to use comma instead (according that app is localized)



Regards



Francillo

You can change default delimiter used in grid using method setDelimiter(delim) method:
mygrid.setDelimiter(";");
After that line you can use:
mygrid.setHeader(“First Column;Second Column;Third Column”);

Hi,
My answer was not very complete and clear, excuse me.

My answer is about numbers.
When I display a cell typed double (or float), only the dot is used as separator. The same idea, when I edit the cell, I must use a dot as a separator.

Regards


Francillo

Hi,
My answer was not very complete and clear, excuse me.

My answer is about numbers.
When I display a cell typed double (or float), only the dot is used as separator. The same idea, when I edit the cell, I must use a dot as a separator.

Regards


Francillo

You can use setNumberFormat(mask, cInd, p_sep, d_sep) to change default decimal separator:
mask - numeric mask; for example 0,000.00 - 1,234.56
cInd - column index
p_sep - char used as decimal separator ( point by default )
d_sep - char used as groups part separator ( comma by default )

mygrid.setNumberFormat(“0,000.00”,index,",","");

Note that this function will not change number format when cell is in edit mode. It can be changed only by implementing custom eXcell type. Please see more information here dhtmlx.com/docs/products/dhtmlxG … #grid_cexc

Is there a way to set these separators by XML? (I use XML header and it overrides setted values at table init).

Rgds

Francillo

You can call this method from xml using:



0,000.00
0
,