Ver Mensaje Individual
  #2  
Antiguo 19-11-2007
Avatar de jhonny
jhonny jhonny is offline
Jhonny Suárez
 
Registrado: may 2003
Ubicación: Colombia
Posts: 7.070
Reputación: 32
jhonny Va camino a la famajhonny Va camino a la fama
Bueno, mira si te sirve la siguiente función:

Código Delphi [-]
procedure SeleccionarTodo(DBGrid :TDBGrid);
var
  Marca :TBookmark;
begin
  with DBGrid, DBGrid.DataSource.DataSet do
  begin
    Marca := GetBookmark;
    try
      First;
      while not Eof do
      begin
        SelectedRows.CurrentRowSelected := True;
        Next;
      end;
      GotoBookmark(Marca);
    finally
      FreeBookmark(Marca);
    end;
  end;
end;
Espero que te sirva .
__________________
Lecciones de mi Madre. Tema: modificación del comportamiento, "Pará de actuar como tu padre!"

http://www.purodelphi.com/
http://www.nosolodelphi.com/

Última edición por jhonny fecha: 19-11-2007 a las 15:40:50. Razón: Mejorar un poco mas la función...
Responder Con Cita