HiddenCols with OnControlClick

Hi,

I have a grid in which the user can hide some colums.
One column (not hide-able) contains HTML forms (two checkboxes).

If the user hides some colums, the OnControlClick-Event isn't working anymore because the Value of ACol is wrong (for example, the checkbox is column 8 (in real), but the property ACol shows 6).

I know that I can use RealColIndex, but do I have to do this for this event? If yes: how?

Thank you and regards.

Yes, for the OnControlClick event, if you need from this event access to the cell value, you need to use the real column index. You can retrieve the real column index via grid.RealColIndex(ACol).

Alternatively, you can also directly access the real cell at display column index via grid.RealCells(ACol,ARow);

So, there are two possibilities to get the cell content for the control clicked in a given cell.