Cita:
Empezado por Caro
Hola Parche, si quieres que funcionen las teclas de arriba y abajo tendras que utilizar el evento OnKeyUp del DbGrid, tendría que ser algo así.
Código Delphi [-]
procedure TForm1.DBGridKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (key=vk_down) or (key=vk_up) then
Label1.Caption := IntToStr(ADOQuery.RecNo)+' de: '+IntToStr(ADOQuery.RecordCount);
Saluditos
|
Buenas tardes:
No conocía: RecNo ... yo lo había hecho así:
procedure TForm1.cmdSiguienteClick(Sender: TObject);
begin
//DBGrid1.DataSource.DataSet.Next;
ADOQuery1.Next;
//lblDe.caption:= '0' + ' de: ' + IntToStr(DBGrid1.DataSource.DataSet.RecordCount);
lblDe.caption:= IntToStr(ADOQuery1.RecNo) + ' de: ' + IntToStr(ADOQuery1.RecordCount);
-----Hecho a partir de lo que me has dicho :-) ----------------
if IntToStr(ADOQuery1.RecNo)=IntToStr(ADOQuery1.RecordCount) then
begin
ShowMessage('Final.');
end
else
end;
Gracias por tu respuesta.
Saludos.