|| | |||Browse by category|
How can I prevent leading zeros from being stripped off when entering numbers into a grid without formula support?
When you enter numbers into a cell Objective Grid parses the string and recognizes the value as number. Objective Grid will set a flag in the style object that marks the value as numeric: SetValueType(GX_VT_NUMERIC). Later when the cell is drawn Objective Grid will check the CGXStyle::GetFormat attribute for the cell and if any formatting is specified format the cell accordingly.
In Objective Grid 6.0, the default format in the standard style was set to GX_FMT_GEN. Therefore when you entered numbers into a cell, the cell was later formatted and leading zeros were stripped off even though the value was correctly stored with leading zeros.
In Objective Grid 6.01 we have changed the standard style format to GX_FMT_DEFAULT. This avoids that leading zeros and trailing digits are stripped off.
OG will not try to format cells then by default any more but you are still able to apply formatting to individual cells via SetStyleRange(range, CGXStyle().SetFormat(GX_FMT_…));