
+ in TRxCustomDBLookupCombo accelerated drawing data - In TRxCustomDBLookupCombo fix select first record if DataField is emty + In RxDBGrid are published missing events from DBGrid + New component TRxCalendarGrid - simple calendar without heading. - fix error compile module rxappicon.pas in Windows for GTK2 (thx ViruZ) + add new module rxiconv.pas (original module iconv.pas from A.Voito) + minor fix in drawing button caption in setup form TToolbar + fix draw disables state for TRxCustomDBLookupCombo - fix compile rxctrls in fpc 2.2 + TPopUpColumnTitle used define NEW_STYLE_TITLE_ALIGNMENT_RXDBGRID + in RxDBGrid images of markers moved to rxdbgrids.lrs (Petr Smolik) + add module for autosort in RxDBGrid exsortzeos.pas for ZeosDB (Petr Smolik) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@276 8e941d3f-bd1b-0410-a28a-d453659cc2b4
38 lines
764 B
ObjectPascal
38 lines
764 B
ObjectPascal
unit exsortzeos;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, SysUtils, DB,
|
|
{$IFDEF FPC}
|
|
RxDBGrid
|
|
{$ELSE}
|
|
exDBGrid
|
|
{$ENDIF}
|
|
,ZConnection, ZDataset, ZAbstractRODataset;
|
|
|
|
type
|
|
TFBDataSetSortEngine = class(TExDBGridSortEngine)
|
|
public
|
|
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean);override;
|
|
end;
|
|
|
|
implementation
|
|
//uses FBCustomDataSet;
|
|
|
|
procedure TFBDataSetSortEngine.Sort(Field:TField; ADataSet:TDataSet; Asc:boolean);
|
|
begin
|
|
if Assigned(ADataSet) then begin
|
|
(ADataSet as TZQuery).SortedFields:=Field.FieldName;
|
|
if Asc then (ADataSet as TZQuery).SortType:=stAscending
|
|
else (ADataSet as TZQuery).SortType:=stDescending;
|
|
end
|
|
end;
|
|
|
|
initialization
|
|
RegisterExDBGridSortEngine(TFBDataSetSortEngine, TZQuery);
|
|
end.
|
|
|