I'd like to know the way to detect the last cell to move focus to the next control.
The last cell is the cell except for ReadOnly cell when Navigation.AdvanceSkipReadOnlyCells := true;
If cell B3 is selection and Enter key is pressed,
I do not understand to move focus to a button on following sample application.
I use AdvStringGrid ver 8.3.8.0 and Delphi XE8.
Sample application
put a TAdvStringGrid and TButton on TForm1, and OnCreate event is below.
procedure TForm1.FormCreate(Sender: TObject);
var i:integer;
begin
AdvStringGrid1.ColCount := 4;
AdvStringGrid1.RowCount := 4;
for i := 1 to AdvStringGrid1.ColCount-1 do begin
AdvStringGrid1.Cells[i, 0] := Char(ord('A')+i-1);
end;
for i := 1 to AdvStringGrid1.RowCount-1 do begin
AdvStringGrid1.Cells[0, i] := Char(ord('1')+i-1);
end;
AdvStringGrid1.Options := AdvStringGrid1.Options + [goEditing];
AdvStringGrid1.Navigation.AdvanceOnEnter := true;
AdvStringGrid1.Navigation.AdvanceOnEnterLoop := false;
AdvStringGrid1.Navigation.AdvanceSkipReadOnlyCells := true;
AdvStringGrid1.ReadOnly[3, 3] := true;
AdvStringGrid1.Cells[3, 3] := 'RO';
end;