|
@@ -61,6 +61,9 @@ type
|
|
|
var Allow: Boolean);
|
|
|
procedure zaBGBillsGridCellCanEdit(Sender: TObject;
|
|
|
const ACoord: TPoint; var Allow: Boolean);
|
|
|
+ procedure zgBGLCurrentChanged(Sender: TObject; Col, Row: Integer);
|
|
|
+ procedure zaBGLBeforeGridRowMove(Sender: TObject; const ACoord: TPoint;
|
|
|
+ ADist: Integer; ADir: TZjMoveDirection);
|
|
|
private
|
|
|
FBGLData: TBGLData;
|
|
|
|
|
@@ -102,6 +105,7 @@ begin
|
|
|
begin
|
|
|
zaBGL.Options := [aoAllowEdit, aoAllowDelete, aoAllowUpMove, aoAllowDownMove];
|
|
|
zaBGL.ExtendRowCount := 0;
|
|
|
+ zgBGL.OnCurrentChanged := zgBGLCurrentChanged;
|
|
|
end
|
|
|
else
|
|
|
zaBGL.Options := [aoAllowInsert, aoAllowEdit, aoAllowDelete, aoAutoInsert, aoAllowUpMove, aoAllowDownMove];
|
|
@@ -284,19 +288,22 @@ end;
|
|
|
procedure TBGLFrame.zaBGLGridCellCanEdit(Sender: TObject;
|
|
|
const ACoord: TPoint; var Allow: Boolean);
|
|
|
begin
|
|
|
- if _IsCloud then
|
|
|
- Allow := FBGLData.GetBGLCanEdit(ACoord.Y)
|
|
|
- else
|
|
|
- Allow := True;
|
|
|
+ if _IsCloud and Allow then
|
|
|
+ Allow := FBGLData.GetBGLCanEdit(ACoord.Y);
|
|
|
end;
|
|
|
|
|
|
procedure TBGLFrame.zaBGBillsGridCellCanEdit(Sender: TObject;
|
|
|
const ACoord: TPoint; var Allow: Boolean);
|
|
|
begin
|
|
|
- if _IsCloud then
|
|
|
- Allow := not FBGLData.cdsBGLViewIsCloud.AsBoolean
|
|
|
- else
|
|
|
- Allow := True;
|
|
|
+ if _IsCloud and Allow then
|
|
|
+ Allow := not FBGLData.cdsBGLViewIsCloud.AsBoolean;
|
|
|
+end;
|
|
|
+
|
|
|
+procedure TBGLFrame.zgBGLCurrentChanged(Sender: TObject; Col,
|
|
|
+ Row: Integer);
|
|
|
+begin
|
|
|
+ dbmPos_Reason.ReadOnly := _IsCloud and FBGLData.cdsBGLViewIsCloud.AsBoolean;
|
|
|
+ dbmDirection.ReadOnly := dbmPos_Reason.ReadOnly;
|
|
|
end;
|
|
|
|
|
|
end.
|