while (idx = -1) or not IsItemSelectable(TCustomItem(Items[idx])) do begin ProcessKeyGrid(Key, selRow, selCol); selrow := Max(0, Min(selrow, maxrow)); selcol := Max(0, Min(selcol, maxcol)); Item := ItemAtRowCol(selrow, selcol); if Assigned(item) then idx := item.Index; // idx return zero. Items[0] is not Selectable !!! end;
I suspect you do not use the latest version of the component. This code is not from the latest version and with the latest version, we cannot reproduce such problem.