From: <jfu...@us...> - 2009-03-09 00:21:34
|
Revision: 12227 http://jvcl.svn.sourceforge.net/jvcl/?rev=12227&view=rev Author: jfudickar Date: 2009-03-09 00:21:20 +0000 (Mon, 09 Mar 2009) Log Message: ----------- TJvDatabaseEditAction.SingleRecordWindowAction now also working with DevExpress VerticalGrid based dialogs Modified Paths: -------------- trunk/jvcl/run/JvDBActions.pas Modified: trunk/jvcl/run/JvDBActions.pas =================================================================== --- trunk/jvcl/run/JvDBActions.pas 2009-03-09 00:16:13 UTC (rev 12226) +++ trunk/jvcl/run/JvDBActions.pas 2009-03-09 00:21:20 UTC (rev 12227) @@ -339,6 +339,8 @@ FSingleRecordWindowAction: TJvDatabaseSingleRecordWindowAction; procedure SetSingleRecordWindowAction(const Value: TJvDatabaseSingleRecordWindowAction); + procedure SingleRecordOnFormShowEvent(ADatacomponent : TComponent; + ADynControlEngineDB: TJvDynControlEngineDB); public procedure UpdateTarget(Target: TObject); override; procedure ExecuteTarget(Target: TObject); override; @@ -1305,9 +1307,17 @@ procedure TJvDatabaseEditAction.ExecuteTarget(Target: TObject); begin inherited ExecuteTarget(Target); - DataSet.Edit; if Assigned(SingleRecordWindowAction) then - FSingleRecordWindowAction.ExecuteTarget(Target); + begin + try + FSingleRecordWindowAction.OnFormShowEvent := SingleRecordOnFormShowEvent; + FSingleRecordWindowAction.ExecuteTarget(Target); + finally + FSingleRecordWindowAction.OnFormShowEvent := nil; + end; + end + else + SingleRecordOnFormShowEvent(nil, nil); end; procedure TJvDatabaseEditAction.Notification(AComponent: TComponent; Operation: @@ -1327,6 +1337,12 @@ FSingleRecordWindowAction.FreeNotification(Self); end; +procedure TJvDatabaseEditAction.SingleRecordOnFormShowEvent(ADatacomponent : + TComponent; ADynControlEngineDB: TJvDynControlEngineDB); +begin + DataSet.Edit; +end; + //=== { TJvDatabaseDeleteAction } ============================================ procedure TJvDatabaseDeleteAction.UpdateTarget(Target: TObject); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |