You should program the event "onKeyDown" of your DbGrid:
procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key=vk_Return then
begin
with DbGrid1 do
begin
if SelectedField.FieldNo=1 then
SelectedField:=Fields[4];
end;
end;
end;
Do you wish to jump to field # 5 or to move one field to the right or left at a time?
Try this - press the tab key to move to right or shift + tab key to move to the left.
yomyom
Alternatively,
drop a list box with values equal to the number of fields
then use the list box to set how many columns to jump at a time e.g
listbox1.selected will return a value.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.