Categories | Question details Back To List | ||||||||
Hi, All the help I got so far is great. Thank you. I have one more question. I have a math type column and would ... Hi, All the help I got so far is great. Thank you. I have one more question. I have a math type column and would like to format thousands and decimal separators. I understand setNumberFormat only works for ed/ro column types. Can this be done for math type columns? I'd like to at least display the thousands separator. I cannot change my column type because the XML has math formulas in cells. Thanks Answer posted by Support on Mar 25, 2008 08:36 In theory you can use any other column type as formatter, so instead of defining columns as grid.setColTypes("ro,ro,math") you can use grid.setColTypes("ro,ro,ron[=]") The last column will be defined as column of "ron" type, but will accept math formulas as cell values in same time. So you can use math formulas and setNumberFormat in same time >> I understand setNumberFormat only works for ed/ro setNumberFormat can be used against edn|ron columns Answer posted on Mar 25, 2008 08:58 I've thought about that but I have math formulas in the actual XML cells using cells from different rows for example =Math.round(([[10,1]]+[[13,1]])/[[10,1]]*100)/100 so changing column type from math to something else would result in an error. Answer posted by Support on Mar 25, 2008 09:28 Please check attached last sample, value of cells in last column based on math formulas, last one use direct cell coordinates, as in you snippet, and it works correctly with formatting There was some fixes in math excell related to similar use-cases, but sample works with older version of extension as well. ( if you need latest js file , please contact us directly at support@dhtmlx.com ) Attachments (1)
|