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?