diff --git a/components/rx/rxdbgrid.pas b/components/rx/rxdbgrid.pas index 556d801f3..6dc959d58 100644 --- a/components/rx/rxdbgrid.pas +++ b/components/rx/rxdbgrid.pas @@ -418,6 +418,8 @@ type //storage procedure OnIniSave(Sender: TObject); procedure OnIniLoad(Sender: TObject); + + procedure CleanDSEvent; protected function DatalinkActive: boolean; procedure DefaultDrawCellA(aCol, aRow: integer; aRect: TRect; @@ -1720,6 +1722,15 @@ begin end; end; +procedure TRxDBGrid.CleanDSEvent; +begin + if Assigned(DataSource) and Assigned(DataSource.DataSet) then + begin + if DataSource.DataSet.OnPostError = @ErrorPo then + DataSource.DataSet.OnPostError := F_EventOnPostError; + end; +end; + procedure TRxDBGrid.DefaultDrawCellA(aCol, aRow: integer; aRect: TRect; aState: TGridDrawState); begin @@ -3189,6 +3200,8 @@ end; destructor TRxDBGrid.Destroy; begin + CleanDSEvent; + FreeAndNil(FRxDbGridLookupComboEditor); FreeAndNil(FRxDbGridDateEditor); FreeAndNil(FMarkerDown); diff --git a/components/rx/rxdbgrid_columsunit.lfm b/components/rx/rxdbgrid_columsunit.lfm index 2be4e6d28..1658f8098 100644 --- a/components/rx/rxdbgrid_columsunit.lfm +++ b/components/rx/rxdbgrid_columsunit.lfm @@ -10,7 +10,7 @@ object rxDBGridColumsForm: TrxDBGridColumsForm OnCreate = FormCreate Position = poScreenCenter ShowHint = True - LCLVersion = '0.9.29' + LCLVersion = '0.9.31' object CheckListBox1: TCheckListBox AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner @@ -18,7 +18,7 @@ object rxDBGridColumsForm: TrxDBGridColumsForm AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = ButtonPanel1 Left = 6 - Height = 317 + Height = 315 Top = 6 Width = 436 Anchors = [akTop, akLeft, akRight, akBottom] @@ -29,9 +29,17 @@ object rxDBGridColumsForm: TrxDBGridColumsForm end object ButtonPanel1: TButtonPanel Left = 6 - Height = 40 - Top = 329 + Height = 42 + Top = 327 Width = 436 + OKButton.Name = 'OKButton' + OKButton.DefaultCaption = True + HelpButton.Name = 'HelpButton' + HelpButton.DefaultCaption = True + CloseButton.Name = 'CloseButton' + CloseButton.DefaultCaption = True + CancelButton.Name = 'CancelButton' + CancelButton.DefaultCaption = True TabOrder = 1 ShowButtons = [pbOK, pbCancel, pbHelp] object SpeedButton2: TSpeedButton @@ -41,12 +49,11 @@ object rxDBGridColumsForm: TrxDBGridColumsForm AnchorSideBottom.Control = SpeedButton1 AnchorSideBottom.Side = asrBottom Left = 143 - Height = 32 + Height = 34 Top = 0 Width = 23 Anchors = [akTop, akLeft, akBottom] BorderSpacing.Left = 6 - Color = clBtnFace Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000064000000640000000000000000000000000000000000 @@ -91,12 +98,11 @@ object rxDBGridColumsForm: TrxDBGridColumsForm AnchorSideTop.Control = ButtonPanel1 AnchorSideBottom.Side = asrBottom Left = 114 - Height = 32 + Height = 34 Top = 0 Width = 23 Anchors = [akTop, akLeft, akBottom] BorderSpacing.Left = 18 - Color = clBtnFace Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000064000000640000000000000000000000000000000000 diff --git a/components/rx/rxdbgrid_columsunit.pas b/components/rx/rxdbgrid_columsunit.pas index b9dedffd8..5a6e3a169 100644 --- a/components/rx/rxdbgrid_columsunit.pas +++ b/components/rx/rxdbgrid_columsunit.pas @@ -98,7 +98,7 @@ var S:string; i:integer; begin - if CheckListBox1.Items.Count > 1 then + if (CheckListBox1.Items.Count > 1) and (CheckListBox1.ItemIndex>-1) then begin if CheckListBox1.ItemIndex>0 then begin @@ -116,7 +116,7 @@ var S:string; i:integer; begin - if CheckListBox1.Items.Count > 1 then + if (CheckListBox1.Items.Count > 1) and (CheckListBox1.ItemIndex>-1) then begin if CheckListBox1.ItemIndex