RxDBGrid - revert prev. vesrion

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2814 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2013-10-28 20:13:17 +00:00
parent d78519fad6
commit b55bf44f64

View File

@@ -469,7 +469,7 @@ type
FSortColumns: TRxDbGridColumnsSortList; FSortColumns: TRxDbGridColumnsSortList;
FSortingNow:Boolean; FSortingNow:Boolean;
FInProcessCalc: integer; FInProcessCalc: integer;
// FAllowedOperations: TRxDBGridAllowedOperations; FAllowedOperations: TRxDBGridAllowedOperations;
// //
FKeyStrokes: TRxDBGridKeyStrokes; FKeyStrokes: TRxDBGridKeyStrokes;
FOnGetCellProps: TGetCellPropsEvent; FOnGetCellProps: TGetCellPropsEvent;
@@ -523,7 +523,6 @@ type
FOldDataSetState:TDataSetState; FOldDataSetState:TDataSetState;
procedure DoCreateJMenu; procedure DoCreateJMenu;
function GetAllowedOperations: TRxDBGridAllowedOperations;
function GetColumns: TRxDbGridColumns; function GetColumns: TRxDbGridColumns;
function GetFooterColor: TColor; function GetFooterColor: TColor;
function GetFooterRowCount: integer; function GetFooterRowCount: integer;
@@ -534,7 +533,6 @@ type
function GetSortOrder: TSortMarker; function GetSortOrder: TSortMarker;
function GetTitleButtons: boolean; function GetTitleButtons: boolean;
function IsColumnsStored: boolean; function IsColumnsStored: boolean;
procedure SetAllowedOperations(AValue: TRxDBGridAllowedOperations);
procedure SetAutoSort(const AValue: boolean); procedure SetAutoSort(const AValue: boolean);
procedure SetColumns(const AValue: TRxDbGridColumns); procedure SetColumns(const AValue: TRxDbGridColumns);
procedure SetFooterColor(const AValue: TColor); procedure SetFooterColor(const AValue: TColor);
@@ -714,7 +712,8 @@ type
read GetPropertyStorage write SetPropertyStorage; read GetPropertyStorage write SetPropertyStorage;
property Version: integer read FVersion write FVersion default 0; property Version: integer read FVersion write FVersion default 0;
property AllowedOperations: TRxDBGridAllowedOperations property AllowedOperations: TRxDBGridAllowedOperations
read GetAllowedOperations write SetAllowedOperations default [aoInsert, aoUpdate, aoDelete, aoAppend]; deprecated; read FAllowedOperations write FAllowedOperations default
[aoInsert, aoUpdate, aoDelete, aoAppend];
property OptionsRx: TOptionsRx read FOptionsRx write SetOptionsRx; property OptionsRx: TOptionsRx read FOptionsRx write SetOptionsRx;
property FooterColor: TColor read GetFooterColor write SetFooterColor default clWindow; deprecated; property FooterColor: TColor read GetFooterColor write SetFooterColor default clWindow; deprecated;
property FooterRowCount: integer read GetFooterRowCount write SetFooterRowCount default 0; deprecated; property FooterRowCount: integer read GetFooterRowCount write SetFooterRowCount default 0; deprecated;
@@ -1697,22 +1696,6 @@ begin
CreateMenuItem('A', sRxDBGridSelectAllRows, @OnSelectAllRows); CreateMenuItem('A', sRxDBGridSelectAllRows, @OnSelectAllRows);
end; end;
function TRxDBGrid.GetAllowedOperations: TRxDBGridAllowedOperations;
begin
// Result:=FAllowedOperations;
if dgDisableInsert in Options then
Result:=Result - [aoInsert, aoAppend]
else
Result:=Result + [aoInsert, aoAppend]
;
if dgDisableDelete in Options then
Result:=Result - [aoDelete]
else
Result:=Result + [aoDelete]
;
end;
function TRxDBGrid.GetPropertyStorage: TCustomPropertyStorage; function TRxDBGrid.GetPropertyStorage: TCustomPropertyStorage;
begin begin
Result := FPropertyStorageLink.Storage; Result := FPropertyStorageLink.Storage;
@@ -1744,20 +1727,6 @@ begin
Result := TRxDbGridColumns(TCustomDrawGrid(Self).Columns).Enabled; Result := TRxDbGridColumns(TCustomDrawGrid(Self).Columns).Enabled;
end; end;
procedure TRxDBGrid.SetAllowedOperations(AValue: TRxDBGridAllowedOperations);
begin
// FAllowedOperations:=AValue;
if [aoInsert, aoAppend] * AValue <> [aoInsert, aoAppend] then
Options:=Options - [dgDisableInsert]
else
Options:=Options + [dgDisableInsert];
if aoDelete in AValue then
Options:=Options - [dgDisableDelete]
else
Options:=Options + [dgDisableDelete]
end;
procedure TRxDBGrid.SetColumns(const AValue: TRxDbGridColumns); procedure TRxDBGrid.SetColumns(const AValue: TRxDbGridColumns);
begin begin
TRxDbGridColumns(TCustomDrawGrid(Self).Columns).Assign(Avalue); TRxDbGridColumns(TCustomDrawGrid(Self).Columns).Assign(Avalue);
@@ -3498,8 +3467,8 @@ begin
if (Key in CCancelQuickSearchKeys) then if (Key in CCancelQuickSearchKeys) then
if Length(QuickUTF8Search) > 0 then if Length(QuickUTF8Search) > 0 then
QuickUTF8Search := ''; QuickUTF8Search := '';
(* case Key of case Key of
{ VK_DELETE: if not (aoDelete in FAllowedOperations) then VK_DELETE: if not (aoDelete in FAllowedOperations) then
exit; exit;
VK_INSERT: if not (aoInsert in FAllowedOperations) then VK_INSERT: if not (aoInsert in FAllowedOperations) then
exit; exit;
@@ -3526,17 +3495,14 @@ begin
begin begin
FTmpReadOnly := ReadOnly; FTmpReadOnly := ReadOnly;
ReadOnly := True; ReadOnly := True;
try inherited KeyDown(Key, Shift);
inherited KeyDown(Key, Shift); ReadOnly := FTmpReadOnly;
finally
ReadOnly := FTmpReadOnly;
end;
exit; exit;
end } end
{ else { else
UpdateRowsHeight; UpdateRowsHeight;
VK_UP:UpdateRowsHeight} VK_UP:UpdateRowsHeight};
end; *) end;
inherited KeyDown(Key, Shift); inherited KeyDown(Key, Shift);
if Key <> 0 then if Key <> 0 then
begin begin
@@ -4472,7 +4438,7 @@ begin
FPropertyStorageLink.OnSave := @OnIniSave; FPropertyStorageLink.OnSave := @OnIniSave;
FPropertyStorageLink.OnLoad := @OnIniLoad; FPropertyStorageLink.OnLoad := @OnIniLoad;
// FAllowedOperations := [aoInsert, aoUpdate, aoDelete, aoAppend]; FAllowedOperations := [aoInsert, aoUpdate, aoDelete, aoAppend];
FFilterListEditor := TFilterListCellEditor.Create(nil); FFilterListEditor := TFilterListCellEditor.Create(nil);
with FFilterListEditor do with FFilterListEditor do