From c3638a1660044287a8297234b588bfb0c4027d3b Mon Sep 17 00:00:00 2001 From: roberto Date: Wed, 15 Apr 2009 15:40:16 +0000 Subject: [PATCH] Se arregla el editorbase para que los componentes devexpress hagan post cuando llamemos a guarfesinterno y la tabla se entere de los cambios git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@420 f4e31baf-9722-1c47-927c-6f952f962d4b --- Source/GUIBase/uEditorBase.pas | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Source/GUIBase/uEditorBase.pas b/Source/GUIBase/uEditorBase.pas index 4b86ffc5..59702c04 100644 --- a/Source/GUIBase/uEditorBase.pas +++ b/Source/GUIBase/uEditorBase.pas @@ -153,6 +153,25 @@ implementation uses Menus, uDMBase, cxControls, uDialogUtils; +{Método que coge el componente editor que tenga el foco y le fuerza a hacer post para que la tabla se entere +} +procedure PostActivecxEditorChanges; +var + AControl: TWinControl; + ActiveEditor: TcxCustomEdit; +begin + ActiveEditor:= nil; + + AControl := Screen.ActiveControl; + if Supports(AControl, IcxInnerEditHelper) then + ActiveEditor:= TcxCustomEdit(AControl.Owner) + else + if AControl is TcxCustomEdit then + ActiveEditor:= TcxCustomEdit(AControl); + if Assigned(ActiveEditor) then + ActiveEditor.PostEditValue; +end; + { ********************************* TfEditorBase ********************************* } @@ -345,7 +364,7 @@ end; procedure TfEditorBase.GuardarInterno; begin - // + PostActivecxEditorChanges; end; procedure TfEditorBase.ImprimirInterno;