Grid and column hiding

I have a grid, with lets say 3 columns, 0, 1 and 2.

I hide column 1 with grid.hidecolumn(1)
How do I know the new index of column 2 (which is then 1)?
grid.RealToDisplRow() does not work and returns either -1 or the same number (2)
grid.DisplToRealColumn() returns also just 2, even the column is now 1.
So how do I know the new column index of a column when I hide columns before that column?


Hi, 


With the following code the RealToDisplColumn returns index 1 for column index 2 which is correct.

  TMSFMXGrid1.ColumnCount := 3;
  TMSFMXGrid1.HideColumn(1);
  log.d(inttostr(TMSFMXGrid1.RealToDisplColumn(2)));