AdvSpreadGrid - formula handling broken when there are hidden columns

Hi!

Formula handling is broken when you have hidden columns "to the left".
no problem when hidden columns are at the right end of the grid.

Place a spreadgrid, make it ColCount = 10.

type some numbers at right most cells, and make a formula on them. Maybe
R1C9 = 2
R2C9 = 3
R3C9 = =R1C9 * R2C9

Now hide some left columns.
Formulas will keep working, based on original address references (as if all columns were unhidden).
BUT, when you type a new formula, it'll check if the col/row references are within RealCells range (available unhidden cols/rows).

In the example above, after hiding some left columns and trying to type a formula using any C9 data, it would mark it with an invalid reference error.
It also applies to CellNameMode nmA1.

If those data/formulas were at the third column, and you hide the first 2 columns (0..1), no problem... you'll be able to reference data from columns 2..7. But you wouldn't be able to reference data from columns 8 & 9.

Is there any workaround for hiding leftmost (or even middle-range) columns without messing up formulas?

Something similar happened in the past working with dbadvgrid & hidden fields. I had to move hidden fields to the end. If they were in the beginning or in the middle, other column properties assignments were completely messed up.

Thanks.

Use grid.SuppressColumn() instead of grid.HideColumn()

Please, updated docs :pray:t4:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.