FNCGrid - Lookup editor

I can use a Column with Editor type etComboBox to let the user select items and have the slected item stored.

But I want the user to select from items, but to store not the item itself, but the selected itenmindex or an associated code or key.

What is the most elegant way to achieve this?

Thank you!


You can use the etComboBox, or your own custom editor, and look at the OnCellEditGetData / OnCellEditSetData and customize the data that will be inserted into the cell.