[patch_done] sorting after post
Posted: 25.07.2008, 14:21
Hi all,
this is my first zeos hack
it is simple but this is the only way i can do this (hacking zeoslib)
After Post zeos allways do sorting (if SortedFields is filled).
With TDBGrid this is not ideal behavior - bad performance, and sequence of records is changed if sorted field changing...
After this little patch there is another option doDontSortOnPost
in ZAbstractRODataset.pas
in ZAbstractDataset.pas
regards
Karpik
PS Sorry for bad english
this is my first zeos hack
it is simple but this is the only way i can do this (hacking zeoslib)
After Post zeos allways do sorting (if SortedFields is filled).
With TDBGrid this is not ideal behavior - bad performance, and sequence of records is changed if sorted field changing...
After this little patch there is another option doDontSortOnPost
in ZAbstractRODataset.pas
Code: Select all
{** Options for dataset. }
TZDatasetOption = (doOemTranslate, doCalcDefaults, doAlwaysDetailResync,
doSmartOpen, doDontSortOnPost);
Code: Select all
procedure TZAbstractDataset.InternalPost;
(...)
{BUG-FIX: bangfauzan addition}
if (SortedFields<>'') and not (doDontSortOnPost in Options) then begin
FreeFieldBuffers;
SetState(dsBrowse);
Resync([]);
(...)
Karpik
PS Sorry for bad english