El botón de eliminar estaba activado cuando en el grid no había ninguna fila seleccionada.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@368 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
ac8d55701b
commit
34b0799e47
@ -162,10 +162,11 @@ end;
|
||||
procedure TfEditorGridBase.actEliminarUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if HayDatos and Assigned(ViewGrid) then
|
||||
(Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes)
|
||||
and not ViewGrid.IsEmpty
|
||||
and ViewGrid.esSeleccionCeldaDatos
|
||||
and (ViewGrid.NumSeleccionados > 0)
|
||||
else
|
||||
(Sender as TAction).Enabled := False;
|
||||
end;
|
||||
|
||||
@ -34,7 +34,9 @@ uses
|
||||
|
||||
procedure TfEditorAlbaranDevCliente.actEliminarUpdate(Sender: TObject);
|
||||
begin
|
||||
(Sender as TAction).Enabled := HayDatos and (FAlbaran.REF_FACTURA = '');
|
||||
inherited;
|
||||
if (Sender as TAction).Enabled then
|
||||
(Sender as TAction).Enabled := (FAlbaran.REF_FACTURA = '');
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranDevCliente.AsignarVista;
|
||||
|
||||
@ -31,7 +31,9 @@ uses
|
||||
|
||||
procedure TfEditorAlbaranesDevCliente.actEliminarUpdate(Sender: TObject);
|
||||
begin
|
||||
(Sender as TAction).Enabled := HayDatos and (FAlbaranes.REF_FACTURA = '');
|
||||
inherited;
|
||||
if (Sender as TAction).Enabled then
|
||||
(Sender as TAction).Enabled := (FAlbaranes.REF_FACTURA = '');
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranesDevCliente.AsignarVista;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user