Hallo,
ich musste die ADODB.PAS und die DBActns.pas leicht anpassen.
Das Projekt wird mit Runtime - Packages kompiliert. Meine
Änderungen an ADODB und DBActns werden nun leider durch die Delphi-
Runtime Packages überblendet.
Was kann ich tun, damit meine Änderungen auch mit Runtime Packages funktionieren ?
Hier die Änderungen
<pre>
ADODB.PAS
function Locate(const KeyFields: string; const KeyValues: Variant;
Options: TLocateOptions = [loCaseInsensitive]): Boolean; override;
(nun mit Vorgabe loCaseInsensitive, muss dann nicht jedes mal angegeben werden)
</pre>
<pre>
DBActns.pas
procedure TDataSetInsert.UpdateTarget(Target: TObject);
begin
with GetDataSet(Target) do
//Enabled := Active and CanModify;
// CNSD Source DevExpress
Enabled := Active and CanModify and not (state in dsEditModes);
end;
procedure TDataSetDelete.UpdateTarget(Target: TObject);
begin
with GetDataSet(Target) do
//Enabled := Active and CanModify and not (Bof and Eof);
// CNSD - DevExpress Patch
Enabled := Active and CanModify and not (Bof and Eof) and not (state in dsEditModes);
end;
- Wird benötigt damit im Edit Modus die Aktion New ausgeblendet wird
- Und das Löschen soll nur im Browse Modus möglich sein
</pre>
ich musste die ADODB.PAS und die DBActns.pas leicht anpassen.
Das Projekt wird mit Runtime - Packages kompiliert. Meine
Änderungen an ADODB und DBActns werden nun leider durch die Delphi-
Runtime Packages überblendet.
Was kann ich tun, damit meine Änderungen auch mit Runtime Packages funktionieren ?
Hier die Änderungen
<pre>
ADODB.PAS
function Locate(const KeyFields: string; const KeyValues: Variant;
Options: TLocateOptions = [loCaseInsensitive]): Boolean; override;
(nun mit Vorgabe loCaseInsensitive, muss dann nicht jedes mal angegeben werden)
</pre>
<pre>
DBActns.pas
procedure TDataSetInsert.UpdateTarget(Target: TObject);
begin
with GetDataSet(Target) do
//Enabled := Active and CanModify;
// CNSD Source DevExpress
Enabled := Active and CanModify and not (state in dsEditModes);
end;
procedure TDataSetDelete.UpdateTarget(Target: TObject);
begin
with GetDataSet(Target) do
//Enabled := Active and CanModify and not (Bof and Eof);
// CNSD - DevExpress Patch
Enabled := Active and CanModify and not (Bof and Eof) and not (state in dsEditModes);
end;
- Wird benötigt damit im Edit Modus die Aktion New ausgeblendet wird
- Und das Löschen soll nur im Browse Modus möglich sein
</pre>
Comment