TAdvStringGrid ComboIndex calls OnGetEditorProp

TAdvStringGrid::ComboIndex calls OnGetEditorProp

In the manual for TAdvStringGrid, on page 34 we are given the following options to get the selected index of a combobox:

    index := grid.ComboBox.Items.IndexOf(grid.Cells[col,row]);
    or alternatively, you can use
    index := grid.ComboIndex[ACol,ARow];

This makes it look like the second one is simply a shortcut for the first.  However the second one triggers a call to OnGetEditorProp, where the first does not.  In a grid with a large number of rows (in my case a few hundred), this causes a huge hit in performance because the combo items will be assigned for every single row.
I'll use the first option now but is this by design or accident?
Regards,
Robin

This is by design. If one wants to dynamically fill the combobox items from the OnGetEditorProp event, grid.ComboIndex[] takes this in account.

Ok I think I see how it works now, it needs the strings to compare against the cell content before it can find the index.  In my case the first option only works because there is only one type of combobox used in the grid.  But if there is more than one type of combobox then I would have to use ComboIndex, with the associated call to OnGetEditorProp.  Thanks for the clarification.