DBGrid - usando teclado para selecionar multiplos registros |
Top Previous Next |
// usando teclado para selecionar multiplos registros procedure TSelecionaCrediarioForm.CredGridKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); var B: TBookMark; begin if Key = Vk_F5 then begin B := CredQy.GetBookmark; CredGrid.SelectedRows.CurrentRowSelected := not CredGrid.SelectedRows.CurrentRowSelected; SomaSelecionados; CredQy.GotoBookmark(B); CredQy.FreeBookmark(B); CredQy.Next; end;
if (Key = 104) or (Key = 56) or (Key = Vk_Up) then begin Key := 0; CredQy.Prior; // 8 end;
if (Key = 98) or (Key = 50) or (Key = Vk_Down) then begin Key := 0; CredQy.Next; // 2 end; end; |