You've already forked lazarus-ccr
fix change column order in RxDBGrid column config dialog
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2193 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -418,6 +418,8 @@ type
|
|||||||
//storage
|
//storage
|
||||||
procedure OnIniSave(Sender: TObject);
|
procedure OnIniSave(Sender: TObject);
|
||||||
procedure OnIniLoad(Sender: TObject);
|
procedure OnIniLoad(Sender: TObject);
|
||||||
|
|
||||||
|
procedure CleanDSEvent;
|
||||||
protected
|
protected
|
||||||
function DatalinkActive: boolean;
|
function DatalinkActive: boolean;
|
||||||
procedure DefaultDrawCellA(aCol, aRow: integer; aRect: TRect;
|
procedure DefaultDrawCellA(aCol, aRow: integer; aRect: TRect;
|
||||||
@@ -1720,6 +1722,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
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;
|
procedure TRxDBGrid.DefaultDrawCellA(aCol, aRow: integer; aRect: TRect;
|
||||||
aState: TGridDrawState);
|
aState: TGridDrawState);
|
||||||
begin
|
begin
|
||||||
@@ -3189,6 +3200,8 @@ end;
|
|||||||
|
|
||||||
destructor TRxDBGrid.Destroy;
|
destructor TRxDBGrid.Destroy;
|
||||||
begin
|
begin
|
||||||
|
CleanDSEvent;
|
||||||
|
|
||||||
FreeAndNil(FRxDbGridLookupComboEditor);
|
FreeAndNil(FRxDbGridLookupComboEditor);
|
||||||
FreeAndNil(FRxDbGridDateEditor);
|
FreeAndNil(FRxDbGridDateEditor);
|
||||||
FreeAndNil(FMarkerDown);
|
FreeAndNil(FMarkerDown);
|
||||||
|
@@ -10,7 +10,7 @@ object rxDBGridColumsForm: TrxDBGridColumsForm
|
|||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
LCLVersion = '0.9.29'
|
LCLVersion = '0.9.31'
|
||||||
object CheckListBox1: TCheckListBox
|
object CheckListBox1: TCheckListBox
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
@@ -18,7 +18,7 @@ object rxDBGridColumsForm: TrxDBGridColumsForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonPanel1
|
AnchorSideBottom.Control = ButtonPanel1
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 317
|
Height = 315
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 436
|
Width = 436
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
@@ -29,9 +29,17 @@ object rxDBGridColumsForm: TrxDBGridColumsForm
|
|||||||
end
|
end
|
||||||
object ButtonPanel1: TButtonPanel
|
object ButtonPanel1: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 40
|
Height = 42
|
||||||
Top = 329
|
Top = 327
|
||||||
Width = 436
|
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
|
TabOrder = 1
|
||||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||||
object SpeedButton2: TSpeedButton
|
object SpeedButton2: TSpeedButton
|
||||||
@@ -41,12 +49,11 @@ object rxDBGridColumsForm: TrxDBGridColumsForm
|
|||||||
AnchorSideBottom.Control = SpeedButton1
|
AnchorSideBottom.Control = SpeedButton1
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 143
|
Left = 143
|
||||||
Height = 32
|
Height = 34
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
Color = clBtnFace
|
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
2000000000000004000064000000640000000000000000000000000000000000
|
2000000000000004000064000000640000000000000000000000000000000000
|
||||||
@@ -91,12 +98,11 @@ object rxDBGridColumsForm: TrxDBGridColumsForm
|
|||||||
AnchorSideTop.Control = ButtonPanel1
|
AnchorSideTop.Control = ButtonPanel1
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 114
|
Left = 114
|
||||||
Height = 32
|
Height = 34
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
BorderSpacing.Left = 18
|
BorderSpacing.Left = 18
|
||||||
Color = clBtnFace
|
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
2000000000000004000064000000640000000000000000000000000000000000
|
2000000000000004000064000000640000000000000000000000000000000000
|
||||||
|
@@ -98,7 +98,7 @@ var
|
|||||||
S:string;
|
S:string;
|
||||||
i:integer;
|
i:integer;
|
||||||
begin
|
begin
|
||||||
if CheckListBox1.Items.Count > 1 then
|
if (CheckListBox1.Items.Count > 1) and (CheckListBox1.ItemIndex>-1) then
|
||||||
begin
|
begin
|
||||||
if CheckListBox1.ItemIndex>0 then
|
if CheckListBox1.ItemIndex>0 then
|
||||||
begin
|
begin
|
||||||
@@ -116,7 +116,7 @@ var
|
|||||||
S:string;
|
S:string;
|
||||||
i:integer;
|
i:integer;
|
||||||
begin
|
begin
|
||||||
if CheckListBox1.Items.Count > 1 then
|
if (CheckListBox1.Items.Count > 1) and (CheckListBox1.ItemIndex>-1) then
|
||||||
begin
|
begin
|
||||||
if CheckListBox1.ItemIndex<CheckListBox1.Items.Count-1 then
|
if CheckListBox1.ItemIndex<CheckListBox1.Items.Count-1 then
|
||||||
begin
|
begin
|
||||||
|
Reference in New Issue
Block a user