HiddenColumns and ACol in event handlers

I have noticed in my work with TAdvColumnGrid that in some event handlers, ACol is a value which maps to the set of all columns, and in others, it maps to the set of display columns. Is there a logic behind this, or a list of which event handlers operate in which way? Should they not all present the ACol value (and ARow, for that matter, but I have not had occasion to discover that) in the same context?


OnEditCellDone presents a value which is in the context of AllColumns; OnEditChange presents in the context of DisplColumns, for example.

The logic is that any visual related event handler that take visual column positions in account use the visual column index. The events that typically need access to celll data, i.e. real cell coordinates use the real cell column coordinate as parameter and this is to save the need for a conversion call (grid.RealColindex, grid.DisplColIndex) for the most typical uses.

Thank  you, Bruno.


If I might suggest it, as a non-breaking change, it would be helpful if the ACol, ARow parameters had different names to signal which mode they reflect.

That is a good suggestion, we'll consider it.

Thank you. I have several grids in my current project where it is convenient to have a mix of hidden and unhidden columns, and both types are accessed in both visual and non-visual events. It's basically a legacy situation, and the complexity of the logic in the forms does not permit me to redesign. Because I am referencing both hidden and unhidden in both visual and non-visual events, I find myself frequently using the wrong mode...