DG.Viewer.grid().getOptions()

Currently the getOptions() Obj for each column in the grid looks like {“width”:67,“columnName”:“subj”,“cellType”:“number”}. What if I wanted to also specify the number of decimal places for each column? Is there a “key:value” pair I could use?

The simplest way is to set the column’s ‘format’ tag to the desired format, such as “0.000” for exactly three digits after comma.

Alternatively, you can also set the “format” property for the corresponding GridColumn

Is there a way of doing this using an object with predefined options, which is applied to the DG.Viewer.grid() using setOptions()?

Just do it via the underlying dataframe (grid.dataFrame), it’s simpler this way. Here is the corresponding sample. let us know if this works.