RxDBGrid - new property TRxCollumn.SortField - define custom sort field(s) for grid collumn
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2896 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
82953d2169
commit
3128e2a844
@ -1,32 +1,40 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="3">
|
||||
<Package Version="4">
|
||||
<Name Value="dcl_rx_ctrl"/>
|
||||
<AddToProjectUsesSection Value="False"/>
|
||||
<Author Value="Lagunov A.A."/>
|
||||
<CompilerOptions>
|
||||
<Version Value="8"/>
|
||||
<Version Value="11"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)/"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Description Value="Design time packet for rx lib"/>
|
||||
<Version Major="1"/>
|
||||
<Files Count="1">
|
||||
<Version Major="2" Minor="6" Release="4" Build="1"/>
|
||||
<Files Count="2">
|
||||
<Item1>
|
||||
<Filename Value="register_rxctrl.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="register_rxctrl"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="rxceeditlookupfields.pas"/>
|
||||
<UnitName Value="rxceEditLookupFields"/>
|
||||
</Item2>
|
||||
</Files>
|
||||
<Type Value="DesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="rxnew"/>
|
||||
<MinVersion Major="1" Minor="2" Valid="True"/>
|
||||
<MinVersion Major="2" Minor="6" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
@ -34,7 +42,7 @@
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)/"/>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
|
@ -1,23 +1,21 @@
|
||||
{ Этот файл был автоматически создан Lazarus. Н<EFBFBD>
|
||||
<EFBFBD> редактировать!
|
||||
Исходный код используется только для комп<EFBFBD>
|
||||
<EFBFBD>ляции и установки пакета.
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit dcl_rx_ctrl;
|
||||
unit dcl_rx_ctrl;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
register_rxctrl, LazarusPackageIntf;
|
||||
register_rxctrl, rxceEditLookupFields, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('register_rxctrl', @register_rxctrl.Register);
|
||||
end;
|
||||
RegisterUnit('register_rxctrl', @register_rxctrl.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('dcl_rx_ctrl', @Register);
|
||||
RegisterPackage('dcl_rx_ctrl', @Register);
|
||||
end.
|
||||
|
@ -52,7 +52,7 @@ type
|
||||
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);override;
|
||||
function EnabledFooterRowsCalc:boolean;override;
|
||||
public
|
||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||
procedure Sort(FieldName: string; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||
procedure SortList(ListField:string; ADataSet:TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions);override;
|
||||
end;
|
||||
|
||||
@ -87,11 +87,11 @@ begin
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
procedure TFBDataSetSortEngine.Sort(Field: TField; ADataSet: TDataSet;
|
||||
procedure TFBDataSetSortEngine.Sort(FieldName: string; ADataSet: TDataSet;
|
||||
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
||||
begin
|
||||
if Assigned(ADataSet) then
|
||||
(ADataSet as TFBDataSet).SortOnField(Field.FieldName, Asc);
|
||||
(ADataSet as TFBDataSet).SortOnField(FieldName, Asc);
|
||||
end;
|
||||
|
||||
procedure TFBDataSetSortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
||||
|
@ -43,7 +43,7 @@ type
|
||||
|
||||
TSQLQuerySortEngine = class(TRxDBGridSortEngine)
|
||||
public
|
||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||
procedure Sort(FieldName: string; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); override;
|
||||
end;
|
||||
|
||||
@ -51,10 +51,10 @@ implementation
|
||||
uses SQLDB, synRegExpr, strUtils;
|
||||
|
||||
|
||||
procedure TSQLQuerySortEngine.Sort(Field: TField; ADataSet: TDataSet;
|
||||
procedure TSQLQuerySortEngine.Sort(FieldName: string; ADataSet: TDataSet;
|
||||
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
||||
begin
|
||||
SortList(Field.FieldName,ADataSet,Asc,SortOptions);
|
||||
SortList(FieldName,ADataSet,Asc,SortOptions);
|
||||
end;
|
||||
|
||||
procedure TSQLQuerySortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
||||
|
@ -16,7 +16,7 @@ type
|
||||
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);override;
|
||||
function EnabledFooterRowsCalc:boolean;override;
|
||||
public
|
||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||
procedure Sort(FieldName: string; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); override;
|
||||
end;
|
||||
|
||||
@ -117,12 +117,13 @@ begin
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
procedure TZeosDataSetSortEngine.Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);
|
||||
procedure TZeosDataSetSortEngine.Sort(FieldName: string; ADataSet: TDataSet;
|
||||
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
||||
begin
|
||||
if not Assigned(ADataSet) then exit;
|
||||
if ADataSet is TZAbstractDataset then
|
||||
begin
|
||||
TZAbstractDataset(ADataSet).SortedFields:=Field.FieldName;
|
||||
TZAbstractDataset(ADataSet).SortedFields:=FieldName;
|
||||
if Asc then
|
||||
TZAbstractDataset(ADataSet).SortType:=stAscending
|
||||
else
|
||||
|
@ -213,6 +213,10 @@ msgstr "Registro"
|
||||
msgid "Retry to connect with database?"
|
||||
msgstr "Reintentar conectar con la base de dato?"
|
||||
|
||||
#: rxdconst.srxallfields
|
||||
msgid "All fields"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxascendign
|
||||
msgid "Ascendign"
|
||||
msgstr "Ascendente"
|
||||
@ -316,6 +320,18 @@ msgstr "Ordenar por Columnas"
|
||||
msgid "Descending"
|
||||
msgstr "Descendente"
|
||||
|
||||
#: rxdconst.srxfieldslookupdisplay
|
||||
msgid "Fields as LookupDisplay"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfillfieldslookupdisp
|
||||
msgid "Fill fields in LookupDisplay property"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfillsortfieldsdisp
|
||||
msgid "Fill fields in SortField property"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfilterformapply
|
||||
msgid "Apply"
|
||||
msgstr "Aceptar"
|
||||
@ -403,6 +419,10 @@ msgstr "&Campos Disponibles :"
|
||||
msgid "Select f&ield for sort data:"
|
||||
msgstr "Seleccionar Dirección de Ordenamiento :"
|
||||
|
||||
#: rxdconst.srxsortfieldsdisplay
|
||||
msgid "Fields as SortField"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxsoursedataset
|
||||
msgid "Sourse dataset"
|
||||
msgstr "Fuente del Conjunto de Datos"
|
||||
|
@ -213,6 +213,10 @@ msgstr ""
|
||||
msgid "Retry to connect with database?"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxallfields
|
||||
msgid "All fields"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxascendign
|
||||
msgid "Ascendign"
|
||||
msgstr ""
|
||||
@ -316,6 +320,18 @@ msgstr ""
|
||||
msgid "Descending"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfieldslookupdisplay
|
||||
msgid "Fields as LookupDisplay"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfillfieldslookupdisp
|
||||
msgid "Fill fields in LookupDisplay property"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfillsortfieldsdisp
|
||||
msgid "Fill fields in SortField property"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfilterformapply
|
||||
msgid "Apply"
|
||||
msgstr ""
|
||||
@ -401,6 +417,10 @@ msgstr ""
|
||||
msgid "Select f&ield for sort data:"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxsortfieldsdisplay
|
||||
msgid "Fields as SortField"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxsoursedataset
|
||||
msgid "Sourse dataset"
|
||||
msgstr ""
|
||||
|
@ -213,6 +213,10 @@ msgstr "Регистрация"
|
||||
msgid "Retry to connect with database?"
|
||||
msgstr "Вы хотите повторить попытку соединения с базой данных?"
|
||||
|
||||
#: rxdconst.srxallfields
|
||||
msgid "All fields"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxascendign
|
||||
msgid "Ascendign"
|
||||
msgstr "По возрастанию"
|
||||
@ -316,6 +320,18 @@ msgstr "Сортировать данные по колонкам"
|
||||
msgid "Descending"
|
||||
msgstr "По убыванию"
|
||||
|
||||
#: rxdconst.srxfieldslookupdisplay
|
||||
msgid "Fields as LookupDisplay"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfillfieldslookupdisp
|
||||
msgid "Fill fields in LookupDisplay property"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfillsortfieldsdisp
|
||||
msgid "Fill fields in SortField property"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfilterformapply
|
||||
msgid "Apply"
|
||||
msgstr "Применить"
|
||||
@ -401,6 +417,10 @@ msgstr "&Выбранные поля"
|
||||
msgid "Select f&ield for sort data:"
|
||||
msgstr "Укажите поля для сортировки данных :"
|
||||
|
||||
#: rxdconst.srxsortfieldsdisplay
|
||||
msgid "Fields as SortField"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxsoursedataset
|
||||
msgid "Sourse dataset"
|
||||
msgstr "Исходная таблица"
|
||||
|
@ -222,6 +222,10 @@ msgstr "Реєстрація"
|
||||
msgid "Retry to connect with database?"
|
||||
msgstr "Ви хочете повторити спробу з'єднання з базою даних?"
|
||||
|
||||
#: rxdconst.srxallfields
|
||||
msgid "All fields"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxascendign
|
||||
msgid "Ascendign"
|
||||
msgstr "По зростанню"
|
||||
@ -325,6 +329,18 @@ msgstr "Сортувати дані по колонках"
|
||||
msgid "Descending"
|
||||
msgstr "За зменшенням"
|
||||
|
||||
#: rxdconst.srxfieldslookupdisplay
|
||||
msgid "Fields as LookupDisplay"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfillfieldslookupdisp
|
||||
msgid "Fill fields in LookupDisplay property"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfillsortfieldsdisp
|
||||
msgid "Fill fields in SortField property"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfilterformapply
|
||||
msgid "Apply"
|
||||
msgstr "Застосувати"
|
||||
@ -410,6 +426,10 @@ msgstr "&Вибрані поля"
|
||||
msgid "Select f&ield for sort data:"
|
||||
msgstr "Вкажіть поля для сортування даних :"
|
||||
|
||||
#: rxdconst.srxsortfieldsdisplay
|
||||
msgid "Fields as SortField"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxsoursedataset
|
||||
msgid "Sourse dataset"
|
||||
msgstr "Початкова таблиця"
|
||||
|
@ -4,15 +4,36 @@ unit register_rxctrl;
|
||||
|
||||
interface
|
||||
uses
|
||||
Classes, SysUtils, LResources, LazarusPackageIntf;
|
||||
Classes, SysUtils, LResources, LazarusPackageIntf, DBPropEdits, PropEdits,
|
||||
DB, ComponentEditors;
|
||||
|
||||
procedure Register;
|
||||
implementation
|
||||
uses RxLogin, ComponentEditors, RxAppIcon, Dialogs, rxconst;
|
||||
type
|
||||
|
||||
resourcestring
|
||||
sTestTRxLoginDialog = 'Test TRxLoginDialog';
|
||||
sLoadIcon = 'Load icon';
|
||||
{ TRxCollumsSortFieldsProperty }
|
||||
|
||||
TRxCollumsSortFieldsProperty = class(TDBGridFieldProperty)
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure Edit; override;
|
||||
procedure FillValues(const Values: TStringList); override;
|
||||
end;
|
||||
|
||||
{ TPopUpColumnFieldProperty }
|
||||
|
||||
TPopUpColumnFieldProperty = class(TFieldProperty)
|
||||
public
|
||||
procedure FillValues(const Values: TStringList); override;
|
||||
end;
|
||||
|
||||
type
|
||||
|
||||
{ THistoryButtonProperty }
|
||||
|
||||
THistoryButtonProperty = class(TStringPropertyEditor)
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
end;
|
||||
|
||||
type
|
||||
|
||||
@ -41,6 +62,16 @@ type
|
||||
procedure ExecuteVerb(Index:integer);override;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
implementation
|
||||
uses RxLogin, RxAppIcon, Dialogs, rxconst, RxHistoryNavigator, rxpopupunit,
|
||||
rxceEditLookupFields, rxdbgrid, rxdconst, duallist, rxstrutils, Forms;
|
||||
|
||||
resourcestring
|
||||
sTestTRxLoginDialog = 'Test TRxLoginDialog';
|
||||
sLoadIcon = 'Load icon';
|
||||
|
||||
|
||||
{ TRxLoginDialogEditor }
|
||||
|
||||
constructor TRxLoginDialogEditor.Create(AComponent: TComponent;
|
||||
@ -160,13 +191,148 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{ THistoryButtonProperty }
|
||||
|
||||
function THistoryButtonProperty.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
Result:= [paValueList, paSortList, paMultiSelect];
|
||||
end;
|
||||
|
||||
procedure THistoryButtonProperty.GetValues(Proc: TGetStrProc);
|
||||
var
|
||||
I: Integer;
|
||||
Navigator:TRxHistoryNavigator;
|
||||
begin
|
||||
Navigator:=TRxHistoryNavigator(GetComponent(0));
|
||||
if Assigned(Navigator) then
|
||||
begin
|
||||
if Assigned(Navigator.ToolPanel) then
|
||||
begin
|
||||
for i:=0 to Navigator.ToolPanel.Items.Count - 1 do
|
||||
begin
|
||||
if Assigned(Navigator.ToolPanel.Items[i].Action) then
|
||||
Proc(Navigator.ToolPanel.Items[i].Action.Name);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TPopUpColumnFieldProperty }
|
||||
|
||||
procedure TPopUpColumnFieldProperty.FillValues(const Values: TStringList);
|
||||
var
|
||||
Column: TPopUpColumn;
|
||||
DataSource: TDataSource;
|
||||
begin
|
||||
Column:=TPopUpColumn(GetComponent(0));
|
||||
if not (Column is TPopUpColumn) then exit;
|
||||
DataSource := TPopUpFormColumns(Column.Collection).PopUpFormOptions.DataSource;
|
||||
if Assigned(DataSource) and Assigned(DataSource.DataSet) then
|
||||
DataSource.DataSet.GetFieldNames(Values);
|
||||
end;
|
||||
|
||||
|
||||
{ TRxCollumsSortFieldsProperty }
|
||||
|
||||
function TRxCollumsSortFieldsProperty.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
Result:= [paValueList, paSortList, paMultiSelect, paDialog];
|
||||
end;
|
||||
|
||||
procedure TRxCollumsSortFieldsProperty.Edit;
|
||||
var
|
||||
DualListDialog1: TDualListDialog;
|
||||
FCol:TRxColumn;
|
||||
/// FGrid:TRxDBGrid;
|
||||
|
||||
procedure DoInitFill;
|
||||
var
|
||||
i,j:integer;
|
||||
LookupDisplay:string;
|
||||
begin
|
||||
LookupDisplay:=FCol.SortFields;
|
||||
if LookupDisplay<>'' then
|
||||
begin
|
||||
StrToStrings(LookupDisplay, DualListDialog1.List2, ';');
|
||||
for i:=DualListDialog1.List1.Count-1 downto 0 do
|
||||
begin
|
||||
j:=DualListDialog1.List2.IndexOf(DualListDialog1.List1[i]);
|
||||
if j>=0 then
|
||||
DualListDialog1.List1.Delete(i);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function DoFillDone:string;
|
||||
var
|
||||
i:integer;
|
||||
begin
|
||||
for i:=0 to DualListDialog1.List2.Count-1 do
|
||||
Result:=Result + DualListDialog1.List2[i]+';';
|
||||
if Result<>'' then
|
||||
Result:=Copy(Result, 1, Length(Result)-1);
|
||||
end;
|
||||
|
||||
procedure DoSetCaptions;
|
||||
begin
|
||||
DualListDialog1.Label1Caption:=sRxAllFields;
|
||||
DualListDialog1.Label2Caption:=sRxSortFieldsDisplay;
|
||||
DualListDialog1.Title:=sRxFillSortFieldsDisp;
|
||||
end;
|
||||
|
||||
begin
|
||||
FCol:=nil;
|
||||
|
||||
if GetComponent(0) is TRxColumn then
|
||||
FCol:=TRxColumn(GetComponent(0))
|
||||
else
|
||||
exit;
|
||||
|
||||
DualListDialog1:=TDualListDialog.Create(Application);
|
||||
try
|
||||
DoSetCaptions;
|
||||
FillValues(DualListDialog1.List1 as TStringList);
|
||||
DoInitFill;
|
||||
if DualListDialog1.Execute then
|
||||
FCol.SortFields:=DoFillDone;
|
||||
finally
|
||||
FreeAndNil(DualListDialog1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxCollumsSortFieldsProperty.FillValues(const Values: TStringList);
|
||||
var
|
||||
Column: TRxColumn;
|
||||
Grid: TRxDBGrid;
|
||||
DataSource: TDataSource;
|
||||
begin
|
||||
Column:=TRxColumn(GetComponent(0));
|
||||
if not (Column is TRxColumn) then exit;
|
||||
Grid:=TRxDBGrid(Column.Grid);
|
||||
if not (Grid is TRxDBGrid) then exit;
|
||||
// LoadDataSourceFields(Grid.DataSource, Values);
|
||||
|
||||
DataSource := Grid.DataSource;
|
||||
if (DataSource is TDataSource) and Assigned(DataSource.DataSet) then
|
||||
DataSource.DataSet.GetFieldNames(Values);
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
//
|
||||
RegisterComponentEditor(TRxLoginDialog, TRxLoginDialogEditor);
|
||||
RegisterComponentEditor(TRxAppIcon, TRxAppIconEditor);
|
||||
end;
|
||||
//
|
||||
RegisterPropertyEditor(TypeInfo(string), TPopUpColumn, 'FieldName', TPopUpColumnFieldProperty);
|
||||
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'BackBtn', THistoryButtonProperty);
|
||||
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'ForwardBtn', THistoryButtonProperty);
|
||||
|
||||
RegisterPropertyEditor(TypeInfo(string), TRxColumn, 'SortFields', TRxCollumsSortFieldsProperty);
|
||||
|
||||
RegisterCEEditLookupFields;
|
||||
//
|
||||
end;
|
||||
end.
|
||||
|
||||
|
@ -49,71 +49,9 @@ uses
|
||||
curredit, rxswitch, rxdice, rxtoolbar, rxxpman, PageMngr, RxAppIcon,
|
||||
Dialogs, ComponentEditors, DBPropEdits, DB, rxctrls,
|
||||
RxCustomChartPanel, AutoPanel, pickdate, rxconst, tooledit, rxclock,
|
||||
rxceEditLookupFields, rxpopupunit, rxspin, RxTimeEdit,
|
||||
rxpopupunit, rxspin, RxTimeEdit,
|
||||
RxAboutDialog, RxViewsPanel, RxMDI;
|
||||
|
||||
type
|
||||
|
||||
|
||||
{ TPopUpColumnFieldProperty }
|
||||
|
||||
TPopUpColumnFieldProperty = class(TFieldProperty)
|
||||
public
|
||||
procedure FillValues(const Values: TStringList); override;
|
||||
end;
|
||||
|
||||
{ TPopUpColumnFieldProperty }
|
||||
|
||||
procedure TPopUpColumnFieldProperty.FillValues(const Values: TStringList);
|
||||
var
|
||||
Column: TPopUpColumn;
|
||||
DataSource: TDataSource;
|
||||
begin
|
||||
Column:=TPopUpColumn(GetComponent(0));
|
||||
if not (Column is TPopUpColumn) then exit;
|
||||
DataSource := TPopUpFormColumns(Column.Collection).PopUpFormOptions.DataSource;
|
||||
if Assigned(DataSource) and Assigned(DataSource.DataSet) then
|
||||
DataSource.DataSet.GetFieldNames(Values);
|
||||
end;
|
||||
|
||||
type
|
||||
|
||||
{ THistoryButtonProperty }
|
||||
|
||||
THistoryButtonProperty = class(TStringPropertyEditor)
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ THistoryButtonProperty }
|
||||
|
||||
function THistoryButtonProperty.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
Result:= [paValueList, paSortList, paMultiSelect];
|
||||
end;
|
||||
|
||||
procedure THistoryButtonProperty.GetValues(Proc: TGetStrProc);
|
||||
var
|
||||
I: Integer;
|
||||
Navigator:TRxHistoryNavigator;
|
||||
begin
|
||||
Navigator:=TRxHistoryNavigator(GetComponent(0));
|
||||
if Assigned(Navigator) then
|
||||
begin
|
||||
if Assigned(Navigator.ToolPanel) then
|
||||
begin
|
||||
for i:=0 to Navigator.ToolPanel.Items.Count - 1 do
|
||||
begin
|
||||
if Assigned(Navigator.ToolPanel.Items[i].Action) then
|
||||
Proc(Navigator.ToolPanel.Items[i].Action.Name);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IFDEF USE_TRxAppIcon}
|
||||
procedure RegisterRxAppIcon;
|
||||
begin
|
||||
@ -252,14 +190,6 @@ begin
|
||||
RegisterUnit('RxViewsPanel', @RegisterRxViewsPanel);
|
||||
RegisterUnit('RxHistoryNavigator', @RegisterRxHistoryNavigator);
|
||||
RegisterUnit('RxMDI', @RegisterRxMDI);
|
||||
|
||||
|
||||
|
||||
//
|
||||
RegisterPropertyEditor(TypeInfo(string), TPopUpColumn, 'FieldName', TPopUpColumnFieldProperty);
|
||||
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'BackBtn', THistoryButtonProperty);
|
||||
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'ForwardBtn', THistoryButtonProperty);
|
||||
RegisterCEEditLookupFields;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -61,7 +61,7 @@ procedure RegisterCEEditLookupFields;
|
||||
implementation
|
||||
uses
|
||||
//
|
||||
db, duallist, Forms, rxstrutils, TypInfo,
|
||||
db, duallist, Forms, rxstrutils, TypInfo, rxdconst,
|
||||
//unit for edits
|
||||
rxlookup;
|
||||
|
||||
@ -150,9 +150,9 @@ end;
|
||||
|
||||
procedure DoSetCaptions;
|
||||
begin
|
||||
DualListDialog1.Label1Caption:='All fields';
|
||||
DualListDialog1.Label2Caption:='Fields is LookupDisplay';
|
||||
DualListDialog1.Title:='Fill fields in LookupDisplay property';
|
||||
DualListDialog1.Label1Caption:=sRxAllFields;
|
||||
DualListDialog1.Label2Caption:=sRxFieldsLookupDisplay;
|
||||
DualListDialog1.Title:=sRxFillFieldsLookupDisp;
|
||||
end;
|
||||
|
||||
begin
|
||||
|
@ -209,7 +209,7 @@ type
|
||||
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);virtual; abstract;
|
||||
function EnabledFooterRowsCalc:boolean;virtual;
|
||||
public
|
||||
procedure Sort(Field: TField; ADataSet: TDataSet; Asc: boolean; SortOptions: TRxSortEngineOptions); virtual; abstract;
|
||||
procedure Sort(FieldName: string; ADataSet: TDataSet; Asc: boolean; SortOptions: TRxSortEngineOptions); virtual; abstract;
|
||||
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); virtual;
|
||||
end;
|
||||
|
||||
@ -416,12 +416,14 @@ type
|
||||
FKeyList: TStrings;
|
||||
FNotInKeyListIndex: integer;
|
||||
FOnDrawColumnCell: TDrawColumnCellEvent;
|
||||
FSortFields: string;
|
||||
FSortOrder: TSortMarker;
|
||||
FSortPosition: integer;
|
||||
FWordWrap: boolean;
|
||||
function GetConstraints: TRxDBGridCollumnConstraints;
|
||||
function GetFooter: TRxColumnFooter;
|
||||
function GetKeyList: TStrings;
|
||||
function GetSortFields:string;
|
||||
procedure SetConstraints(AValue: TRxDBGridCollumnConstraints);
|
||||
procedure SetEditButtons(AValue: TRxColumnEditButtons);
|
||||
procedure SetFilter(const AValue: TRxColumnFilter);
|
||||
@ -440,6 +442,7 @@ type
|
||||
property SortOrder: TSortMarker read FSortOrder write FSortOrder;
|
||||
property SortPosition: integer read FSortPosition;
|
||||
published
|
||||
property SortFields: string read FSortFields write FSortFields;
|
||||
property Footer: TRxColumnFooter read GetFooter write SetFooter;
|
||||
property Constraints:TRxDBGridCollumnConstraints read GetConstraints write SetConstraints;
|
||||
property ImageList: TImageList read FImageList write SetImageList;
|
||||
@ -1871,7 +1874,7 @@ end;
|
||||
function TRxDBGrid.GetSortField: string;
|
||||
begin
|
||||
if FSortColumns.Count > 0 then
|
||||
Result:=FSortColumns[0].FieldName
|
||||
Result:=FSortColumns[0].GetSortFields
|
||||
else
|
||||
Result:='';
|
||||
end;
|
||||
@ -2584,13 +2587,13 @@ begin
|
||||
Asc[i]:=FSortColumns[i].FSortOrder = smUp;
|
||||
if S<>'' then
|
||||
S:=S+';';
|
||||
S:=S + FSortColumns[i].FieldName;
|
||||
S:=S + FSortColumns[i].GetSortFields;
|
||||
end;
|
||||
{ TODO : Необходимо добавить опцию регистронезависимого поиска }
|
||||
FSortEngine.SortList(S, DataSource.DataSet, Asc, SortEngineOptions);
|
||||
end
|
||||
else
|
||||
FSortEngine.Sort(FSortColumns[0].Field, DataSource.DataSet, FSortColumns[0].FSortOrder = smUp, SortEngineOptions);
|
||||
FSortEngine.Sort(FSortColumns[0].GetSortFields, DataSource.DataSet, FSortColumns[0].FSortOrder = smUp, SortEngineOptions);
|
||||
FSortingNow:=false;
|
||||
end;
|
||||
|
||||
@ -4872,6 +4875,14 @@ begin
|
||||
Result := FKeyList;
|
||||
end;
|
||||
|
||||
function TRxColumn.GetSortFields: string;
|
||||
begin
|
||||
if FSortFields = '' then
|
||||
Result:=FieldName
|
||||
else
|
||||
Result:=FSortFields;
|
||||
end;
|
||||
|
||||
procedure TRxColumn.SetConstraints(AValue: TRxDBGridCollumnConstraints);
|
||||
begin
|
||||
FConstraints.Assign(AValue);
|
||||
|
@ -92,6 +92,11 @@ resourcestring
|
||||
SCircularDataLink = 'SCircularDataLink';
|
||||
sRxAscendign = 'Ascendign';
|
||||
sRxDescending = 'Descending';
|
||||
sRxAllFields = 'All fields';
|
||||
sRxFieldsLookupDisplay = 'Fields as LookupDisplay';
|
||||
sRxFillFieldsLookupDisp = 'Fill fields in LookupDisplay property';
|
||||
sRxSortFieldsDisplay = 'Fields as SortField';
|
||||
sRxFillSortFieldsDisp = 'Fill fields in SortField property';
|
||||
|
||||
|
||||
SDeleteRecordQuestion = 'Delete record?';
|
||||
|
@ -26,8 +26,8 @@ Copyright (c) 1998 Master-Bank
|
||||
translate to Lazarus by alexs in 2005 - 2014
|
||||
"/>
|
||||
<License Value="LGPL"/>
|
||||
<Version Major="2" Minor="6" Release="3" Build="140"/>
|
||||
<Files Count="68">
|
||||
<Version Major="2" Minor="6" Release="4" Build="142"/>
|
||||
<Files Count="67">
|
||||
<Item1>
|
||||
<Filename Value="autopanel.pas"/>
|
||||
<UnitName Value="AutoPanel"/>
|
||||
@ -116,193 +116,189 @@ translate to Lazarus by alexs in 2005 - 2014
|
||||
<UnitName Value="rxapputils"/>
|
||||
</Item21>
|
||||
<Item22>
|
||||
<Filename Value="rxceeditlookupfields.pas"/>
|
||||
<UnitName Value="rxceEditLookupFields"/>
|
||||
</Item22>
|
||||
<Item23>
|
||||
<Filename Value="rxclock.pas"/>
|
||||
<UnitName Value="rxclock"/>
|
||||
</Item23>
|
||||
<Item24>
|
||||
</Item22>
|
||||
<Item23>
|
||||
<Filename Value="rxconfigvalues.pas"/>
|
||||
<UnitName Value="rxConfigValues"/>
|
||||
</Item24>
|
||||
<Item25>
|
||||
</Item23>
|
||||
<Item24>
|
||||
<Filename Value="rxconst.pas"/>
|
||||
<UnitName Value="rxconst"/>
|
||||
</Item25>
|
||||
<Item26>
|
||||
</Item24>
|
||||
<Item25>
|
||||
<Filename Value="rxctrls.pas"/>
|
||||
<UnitName Value="rxctrls"/>
|
||||
</Item26>
|
||||
<Item27>
|
||||
</Item25>
|
||||
<Item26>
|
||||
<Filename Value="rxcustomchartpanel.pas"/>
|
||||
<UnitName Value="rxcustomchartpanel"/>
|
||||
</Item27>
|
||||
<Item28>
|
||||
</Item26>
|
||||
<Item27>
|
||||
<Filename Value="rxdbcolorbox.pas"/>
|
||||
<UnitName Value="RxDBColorBox"/>
|
||||
</Item28>
|
||||
<Item29>
|
||||
</Item27>
|
||||
<Item28>
|
||||
<Filename Value="rxdbcomb.pas"/>
|
||||
<UnitName Value="rxdbcomb"/>
|
||||
</Item29>
|
||||
<Item30>
|
||||
</Item28>
|
||||
<Item29>
|
||||
<Filename Value="rxdbctrls.pas"/>
|
||||
<UnitName Value="RxDBCtrls"/>
|
||||
</Item30>
|
||||
<Item31>
|
||||
</Item29>
|
||||
<Item30>
|
||||
<Filename Value="rxdbgrid.pas"/>
|
||||
<UnitName Value="rxdbgrid"/>
|
||||
</Item31>
|
||||
<Item32>
|
||||
</Item30>
|
||||
<Item31>
|
||||
<Filename Value="rxdbgrid.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item32>
|
||||
<Item33>
|
||||
</Item31>
|
||||
<Item32>
|
||||
<Filename Value="rxdbgrid_columsunit.pas"/>
|
||||
<UnitName Value="rxdbgrid_columsunit"/>
|
||||
</Item33>
|
||||
<Item34>
|
||||
</Item32>
|
||||
<Item33>
|
||||
<Filename Value="rxdbgrid_findunit.pas"/>
|
||||
<UnitName Value="rxdbgrid_findunit"/>
|
||||
</Item34>
|
||||
<Item35>
|
||||
</Item33>
|
||||
<Item34>
|
||||
<Filename Value="rxdbspinedit.pas"/>
|
||||
<UnitName Value="RxDBSpinEdit"/>
|
||||
</Item35>
|
||||
<Item36>
|
||||
</Item34>
|
||||
<Item35>
|
||||
<Filename Value="rxdbtimeedit.pas"/>
|
||||
<UnitName Value="RxDBTimeEdit"/>
|
||||
</Item36>
|
||||
<Item37>
|
||||
</Item35>
|
||||
<Item36>
|
||||
<Filename Value="rxdconst.pas"/>
|
||||
<UnitName Value="rxdconst"/>
|
||||
</Item37>
|
||||
<Item38>
|
||||
</Item36>
|
||||
<Item37>
|
||||
<Filename Value="rxdice.pas"/>
|
||||
<UnitName Value="rxdice"/>
|
||||
</Item38>
|
||||
<Item39>
|
||||
</Item37>
|
||||
<Item38>
|
||||
<Filename Value="rxfileutils.pas"/>
|
||||
<UnitName Value="rxFileUtils"/>
|
||||
</Item39>
|
||||
<Item40>
|
||||
</Item38>
|
||||
<Item39>
|
||||
<Filename Value="rxfilterby.pas"/>
|
||||
<UnitName Value="rxfilterby"/>
|
||||
</Item40>
|
||||
<Item41>
|
||||
</Item39>
|
||||
<Item40>
|
||||
<Filename Value="rxiconv.pas"/>
|
||||
<UnitName Value="rxiconv"/>
|
||||
</Item41>
|
||||
<Item42>
|
||||
</Item40>
|
||||
<Item41>
|
||||
<Filename Value="rxlogin.pas"/>
|
||||
<UnitName Value="rxlogin"/>
|
||||
</Item42>
|
||||
<Item43>
|
||||
</Item41>
|
||||
<Item42>
|
||||
<Filename Value="rxlookup.pas"/>
|
||||
<UnitName Value="rxlookup"/>
|
||||
</Item43>
|
||||
<Item44>
|
||||
</Item42>
|
||||
<Item43>
|
||||
<Filename Value="rxmemds.pas"/>
|
||||
<UnitName Value="rxmemds"/>
|
||||
</Item44>
|
||||
<Item45>
|
||||
</Item43>
|
||||
<Item44>
|
||||
<Filename Value="rxpopupunit.pas"/>
|
||||
<UnitName Value="rxpopupunit"/>
|
||||
</Item45>
|
||||
<Item46>
|
||||
</Item44>
|
||||
<Item45>
|
||||
<Filename Value="rxsortmemds.pas"/>
|
||||
<UnitName Value="rxsortmemds"/>
|
||||
</Item46>
|
||||
<Item47>
|
||||
</Item45>
|
||||
<Item46>
|
||||
<Filename Value="rxspin.pas"/>
|
||||
<UnitName Value="rxspin"/>
|
||||
</Item47>
|
||||
<Item48>
|
||||
</Item46>
|
||||
<Item47>
|
||||
<Filename Value="rxstrutils.pas"/>
|
||||
<UnitName Value="rxstrutils"/>
|
||||
</Item48>
|
||||
<Item49>
|
||||
</Item47>
|
||||
<Item48>
|
||||
<Filename Value="rxswitch.pas"/>
|
||||
<UnitName Value="rxswitch"/>
|
||||
</Item49>
|
||||
<Item50>
|
||||
</Item48>
|
||||
<Item49>
|
||||
<Filename Value="rxsystemservices.pas"/>
|
||||
<UnitName Value="RxSystemServices"/>
|
||||
</Item50>
|
||||
<Item51>
|
||||
</Item49>
|
||||
<Item50>
|
||||
<Filename Value="rxtbrsetup.pas"/>
|
||||
<UnitName Value="rxtbrsetup"/>
|
||||
</Item51>
|
||||
<Item52>
|
||||
</Item50>
|
||||
<Item51>
|
||||
<Filename Value="rxtimeedit.pas"/>
|
||||
<UnitName Value="RxTimeEdit"/>
|
||||
</Item52>
|
||||
<Item53>
|
||||
</Item51>
|
||||
<Item52>
|
||||
<Filename Value="rxtoolbar.pas"/>
|
||||
<UnitName Value="rxtoolbar"/>
|
||||
</Item53>
|
||||
<Item54>
|
||||
</Item52>
|
||||
<Item53>
|
||||
<Filename Value="rxversinfo.pas"/>
|
||||
<UnitName Value="RxVersInfo"/>
|
||||
</Item54>
|
||||
<Item55>
|
||||
</Item53>
|
||||
<Item54>
|
||||
<Filename Value="rxviewspanel.pas"/>
|
||||
<UnitName Value="RxViewsPanel"/>
|
||||
</Item55>
|
||||
<Item56>
|
||||
</Item54>
|
||||
<Item55>
|
||||
<Filename Value="rxxpman.pas"/>
|
||||
<UnitName Value="rxxpman"/>
|
||||
</Item56>
|
||||
<Item57>
|
||||
</Item55>
|
||||
<Item56>
|
||||
<Filename Value="seldsfrm.pas"/>
|
||||
<UnitName Value="seldsfrm"/>
|
||||
</Item57>
|
||||
<Item58>
|
||||
</Item56>
|
||||
<Item57>
|
||||
<Filename Value="tooledit.pas"/>
|
||||
<UnitName Value="tooledit"/>
|
||||
</Item58>
|
||||
<Item59>
|
||||
</Item57>
|
||||
<Item58>
|
||||
<Filename Value="vclutils.pas"/>
|
||||
<UnitName Value="vclutils"/>
|
||||
</Item59>
|
||||
<Item60>
|
||||
</Item58>
|
||||
<Item59>
|
||||
<Filename Value="rxcloseformvalidator.pas"/>
|
||||
<UnitName Value="RxCloseFormValidator"/>
|
||||
</Item60>
|
||||
<Item61>
|
||||
</Item59>
|
||||
<Item60>
|
||||
<Filename Value="rxhistorynavigator.pas"/>
|
||||
<UnitName Value="RxHistoryNavigator"/>
|
||||
</Item61>
|
||||
<Item62>
|
||||
</Item60>
|
||||
<Item61>
|
||||
<Filename Value="ex_rx_bin_datapacket.pas"/>
|
||||
<UnitName Value="ex_rx_bin_datapacket"/>
|
||||
</Item62>
|
||||
<Item63>
|
||||
</Item61>
|
||||
<Item62>
|
||||
<Filename Value="ex_rx_datapacket.pas"/>
|
||||
<UnitName Value="ex_rx_datapacket"/>
|
||||
</Item63>
|
||||
<Item64>
|
||||
</Item62>
|
||||
<Item63>
|
||||
<Filename Value="ex_rx_xml_datapacket.pas"/>
|
||||
<UnitName Value="ex_rx_xml_datapacket"/>
|
||||
</Item64>
|
||||
<Item65>
|
||||
</Item63>
|
||||
<Item64>
|
||||
<Filename Value="rxsortby.lfm"/>
|
||||
<Type Value="LFM"/>
|
||||
</Item65>
|
||||
<Item66>
|
||||
</Item64>
|
||||
<Item65>
|
||||
<Filename Value="rxsortby.pas"/>
|
||||
<UnitName Value="rxsortby"/>
|
||||
</Item66>
|
||||
<Item67>
|
||||
</Item65>
|
||||
<Item66>
|
||||
<Filename Value="rxmdi.pas"/>
|
||||
<UnitName Value="RxMDI"/>
|
||||
</Item67>
|
||||
<Item68>
|
||||
</Item66>
|
||||
<Item67>
|
||||
<Filename Value="rxinipropstorage.pas"/>
|
||||
<UnitName Value="RxIniPropStorage"/>
|
||||
</Item68>
|
||||
</Item67>
|
||||
</Files>
|
||||
<LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/>
|
||||
<i18n>
|
||||
|
@ -10,15 +10,15 @@ uses
|
||||
AutoPanel, boxprocs, curredit, dateutil, dbcurredit, dbdateedit, dbutils,
|
||||
duallist, fduallst, folderlister, pagemngr, pickdate, registerrx,
|
||||
RegisterRxDB, RegisterRxTools, RxAboutDialog, rxAboutFormUnit, rxappicon,
|
||||
rxapputils, rxceEditLookupFields, rxclock, rxConfigValues, rxconst, rxctrls,
|
||||
rxcustomchartpanel, RxDBColorBox, rxdbcomb, RxDBCtrls, rxdbgrid,
|
||||
rxdbgrid_columsunit, rxdbgrid_findunit, RxDBSpinEdit, RxDBTimeEdit,
|
||||
rxdconst, rxdice, rxFileUtils, rxfilterby, rxiconv, rxlogin, rxlookup,
|
||||
rxmemds, rxpopupunit, rxsortmemds, rxspin, rxstrutils, rxswitch,
|
||||
RxSystemServices, rxtbrsetup, RxTimeEdit, rxtoolbar, RxVersInfo,
|
||||
RxViewsPanel, rxxpman, seldsfrm, tooledit, vclutils, RxCloseFormValidator,
|
||||
RxHistoryNavigator, ex_rx_bin_datapacket, ex_rx_datapacket,
|
||||
ex_rx_xml_datapacket, rxsortby, RxMDI, RxIniPropStorage, LazarusPackageIntf;
|
||||
rxapputils, rxclock, rxConfigValues, rxconst, rxctrls, rxcustomchartpanel,
|
||||
RxDBColorBox, rxdbcomb, RxDBCtrls, rxdbgrid, rxdbgrid_columsunit,
|
||||
rxdbgrid_findunit, RxDBSpinEdit, RxDBTimeEdit, rxdconst, rxdice,
|
||||
rxFileUtils, rxfilterby, rxiconv, rxlogin, rxlookup, rxmemds, rxpopupunit,
|
||||
rxsortmemds, rxspin, rxstrutils, rxswitch, RxSystemServices, rxtbrsetup,
|
||||
RxTimeEdit, rxtoolbar, RxVersInfo, RxViewsPanel, rxxpman, seldsfrm,
|
||||
tooledit, vclutils, RxCloseFormValidator, RxHistoryNavigator,
|
||||
ex_rx_bin_datapacket, ex_rx_datapacket, ex_rx_xml_datapacket, rxsortby,
|
||||
RxMDI, RxIniPropStorage, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -47,7 +47,7 @@ type
|
||||
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);override;
|
||||
function EnabledFooterRowsCalc:boolean;override;
|
||||
public
|
||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||
procedure Sort(FieldName: string; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||
procedure SortList(ListField:string; ADataSet:TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions);override;
|
||||
end;
|
||||
|
||||
@ -116,11 +116,11 @@ begin
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
procedure TRxMemoryDataSortEngine.Sort(Field:TField; ADataSet:TDataSet;
|
||||
Asc:boolean; SortOptions:TRxSortEngineOptions);
|
||||
procedure TRxMemoryDataSortEngine.Sort(FieldName: string; ADataSet: TDataSet;
|
||||
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
||||
begin
|
||||
if Assigned(ADataSet) then
|
||||
(ADataSet as TRxMemoryData).SortOnFields(Field.FieldName, seoCaseInsensitiveSort in SortOptions, not Asc);
|
||||
(ADataSet as TRxMemoryData).SortOnFields(FieldName, seoCaseInsensitiveSort in SortOptions, not Asc);
|
||||
end;
|
||||
|
||||
procedure TRxMemoryDataSortEngine.SortList(ListField: string;
|
||||
|
@ -597,15 +597,6 @@ begin
|
||||
|
||||
ABounds := Screen.MonitorFromPoint(P).BoundsRect;
|
||||
|
||||
{ if PopupOrigin.X + Width > ABounds.Right then
|
||||
Left := ABounds.Right - Width
|
||||
else
|
||||
Left := PopupOrigin.X;
|
||||
if PopupOrigin.Y + Height > ABounds.Bottom then
|
||||
Top := ABounds.Bottom - Height
|
||||
else
|
||||
Top := PopupOrigin.Y;}
|
||||
|
||||
Y := P.Y + Height;
|
||||
if Y + FPopup.Height > ABounds.Right then
|
||||
Y := P.Y - FPopup.Height;
|
||||
|
Loading…
Reference in New Issue
Block a user