Page 1 of 1

[patch_done] sorting after post

Posted: 25.07.2008, 14:21
by karpik
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

Code: Select all

  {** Options for dataset. }
  TZDatasetOption = (doOemTranslate, doCalcDefaults, doAlwaysDetailResync,
    doSmartOpen, doDontSortOnPost);
in ZAbstractDataset.pas

Code: Select all


procedure TZAbstractDataset.InternalPost;

(...)

    {BUG-FIX: bangfauzan addition}
    if (SortedFields<>'') and not (doDontSortOnPost in Options)  then begin
      FreeFieldBuffers;
      SetState(dsBrowse);
      Resync([]);

(...)
regards
Karpik

PS Sorry for bad english

Posted: 06.08.2008, 13:30
by mdaems
Committed your patch to testing branch. (SVN rev. 407)

Mark