dhxGrid.addRow delimeter

when using addRow([“this is a test”, “$4,999”,“help”]), if a cell contains a comma ($4,999), even though the cell is quoted, the string is interpreted as 4 cells and not 3. I’ve tried changing the cell delimeter on a grid with -

grid.csv.cell("|")

without any luck. Any other suggestions?

Cheers.

First parameter of addRow() method must be unique id of the row:

grid.addRow(newId,[“this is a test”, “$4,999”,“help”]);

If you are using correct format of addRow() method and issue still occurs, check what type does 2nd column have. If it “ed” or “ro” provided format should work as expected.

dhxGrid.setColTypes(“ro,ro,ro,ro,ro,price,ro,ro,ro,ro,ro,ro”);

dhxGrid.addRow(uniq_id,[“some name”,“US”,“Ambassador”,“Ambassador III”,"(xxx) xxx xxxx","$11,221.97",“85730.75”,“85730.75”,“107138”,“04-May-1998”,“some address 60645","email@companya.com”])

I see the following displayed in my grid object (bracket and quotation marks also) . The “$11,221.97” now spans 2 columns and I lose sight of the email address

[“some name”
“US”,
“Ambassador”
“Ambassador III”
“(xxx) xxx xxxx”
“$11”
“221.97”
“85730.75”
“85730.75”
“107138”
“04-May-1998”
“some address 60645”]

I see the same condition if my address contains a comma.

Not sure what I’m missing here.

Cheers.

I figured out my issue regarding the price column. However, is there any way to format this column ($1,234.55)? I see setNumberFormat is not part of the standard edition.

Cheers, Ed.

The only way to do it is to use “ro” eXcell type and pass “$1,234.55” as cell value.

Also you can define custom eXcell type and format cell in necessary you need. Please find tutorial here docs.dhtmlx.com/doku.php?id=dhtm … creation&s[]=custom&s[]=excell