Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 22:56

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: 04 Jul 2019, 14:51 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 46
Location: Brazil
Hello,

I'm using TDBGridEh and DataSource linked with TClientDataSet.
The SortLocal on DBGridEh is set to True and I declared the unit EhLibCDS.pas
If the ClientDataSet is not active when i try sort some column clicking on grid title, delphi's returns closed ClientDataSet error.

i've fixed with this on EhLibCDS.Pas:
Code:
procedure TCDSDatasetFeaturesEh.ApplySorting(Sender: TObject; DataSet: TDataSet; IsReopen: Boolean);
var
  DS: TDataSet;
  CDS: TCustomClientDataSetCrack;
  DatasetFeatures: TDatasetFeaturesEh;
  i: Integer;
  IndexFields, IndexDescFields, MasterFields: String;
  SortOrder: TSortOrderEh;
  grid: TCustomDBGridEh;
begin
  if Sender is TCustomDBGridEh then
    if (TCustomDBGridEh(Sender).SortLocal) then
    begin
      if (not DataSet.Active) then
        Exit;
      if DataSet.RecordCount = 0 then
        Exit;
    .....

it is the right fix to this problem?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group