TDBPlanne - TDBWeekSource. The change of weeks will not take effect

The event starts when the form is created. All is OK

procedure TfrmPlannerRole.advsedNumberOfWeekWeekChange(Sender: TObject);
var
  SpinEdit: TAdvSpinEdit;
begin
  SpinEdit := TAdvSpinEdit(Sender);
  dbwksrWeek.Active := False;
  dbwksrWeek.BeginUpdate;

  try
    dbwksrWeek.Weeks := SpinEdit.Value;
    dbwksrWeek.UpdatePlanner;
  finally
    dbwksrWeek.EndUpdate;
    dbwksrWeek.Active := True;
  end;
end;

Click on advsedNumberOfWeekWeek (TAdvSpinEdit) there is no change. I have no idea why.

There is no any demo for TDBWeekSource.
I did not find an explanation of the methods as PlannerChanged, Reload, UpdatePlanner, Active (False/True)... anywhere.
The name alone is not enough to describe them accurately.

Strange behavior:

    dbplWeek.Header.Captions.Strings[1] := 'Weeks ' + IntToStr(SpinEdit.Value);   //  OK
    dbwksrWeek.Planner.Header.Captions.Strings[1] := 'Weeks: ' + IntToStr(SpinEdit.Value);  // Nothing

It is something related to D10.4.1. I started preparing a demo for you. Lots of problems. So I deleted the files that D creates itself. It started to work for me. In an attempt
Dsp.DisplayStart: = Round (DispStrH + (DispStrM / MinsPerHour)) * RowsPerH;
it will print out to me AV. Everything else goes.

In the project Dsp.DisplayStart: = xx; works. But the others are NOT.
I will research further.
Thank you for such a product (Delphi)

That's how I discovered it. I just don't get it.
I have 3 TAdvOfficePage. When creating a form must be TAdvOfficePager.ActivePage = 0. Then it all works.
He hadn't found out why yet.

I'm sorry but I cannot make sense out of these posts all with just different code snippets.
It gives me no idea about what exactly you are doing.

If you change DBWeekSource.Weeks, is your dataset active? If not, do the weeks become visible when you make your dataset active.

If a problem persists, isolate this and provide a sample source project with which this can be reproduced.

The reason is in my code. I have to find out for myself. If I find something interesting, I'll put it here. So that no one else worries unnecessarily.
This topic is already closed/resolved for you.
I'm sorry about my spamming discussion

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.