Ver Mensaje Individual
  #1  
Antiguo 03-11-2017
Avatar de The Cid James
The Cid James The Cid James is offline
Miembro
NULL
 
Registrado: jun 2013
Posts: 129
Reputación: 11
The Cid James Va por buen camino
Enviar datos de un dbgrid a dbedit o a otro dbgrid

Anteriormente enviaba los datos de un form a otro facilmente con

Código Delphi [-]
procedure TfListadoCliente.bModificarClick(Sender: TObject);
begin
  fmodulo.tCliente.Active := true;
  if fmodulo.tCliente.Locate('id_cliente',
  fmodulo.qCliente['id_cliente'], [])
    then
  begin
    fmodulo.tCliente.Edit;
    fcliente := Tfcliente.Create(Self);
    try
      fcliente.ShowModal;
    finally
      fcliente.Free;
    end;
  end;
  fmodulo.tCliente.Active := false;
  fmodulo.qCliente.Refresh;
end;
Esto funcionaba bien pero terminaba trabajando con demasiados formularios abiertos para hacer solo una edicion de datos asi que cambie el entorno para hacer todo en un solo form como se muestra en la imagen



Pero no logro mandar los datos a los dbedit

Código Delphi [-]
procedure TfListadoCliente.bModificarClick(Sender: TObject);
begin
  if fmodulo.tCliente.Locate('id_cliente',  fmodulo.qCliente['id_cliente'], [])
    then
      begin
        fcliente := Tfcliente.Create(Self);
      end;
   fmodulo.qCliente.Refresh;
end;

Tambien tenia pensado usar un dbgroipbox y filtrar datos en el dbgrid alguna sugerencia al respecto?
__________________
We are told to remember the idea, not the man, because a man can fail. He can be caught, he can be killed and forgotten, but 400 years later, an idea can still change the world.

Última edición por The Cid James fecha: 03-11-2017 a las 09:08:12.
Responder Con Cita