background items & SynchDBItems


I have the problem with SynchDBItems - after calling this function all background items disappears.
(Backgroud items were added in FieldsToItem-function)

Is there any workaround known or i do something wrong?

Thanks in advance!

i assume the condition:

    if (dt > FDay) and (dt < FDay + Span) then
in the SynchDBItems function is wrong.
IMHO: if (dt >= FDay) ...
 would be better - otherwise we lost "todays" item by synching.
as far i can see it's a reason for getting background items disappear after SynchDBItems 

Can you please provide some more background on this issue and preferably some sample source project with which the problem can be reproduced. With the above information I know near nothing, no property settings, no mode, nothing about time-axis, nothing about DB binding etc...

I have equal behavior in 2 different projects.

in one of the projects several DB-planners will be combined with with TDBDaySource, settings for sources are:

    AutoHeaderUpdate:= true;
    DataSource := ds1;
    DateFormat := '';
    Mode := dmMultiResource;

    StartTimeField := 'STARTTIME';
    EndTimeField := 'ENDTIME';
    SubjectField := 'Location';
    ResourceField := 'loginId';// 'ResourceId';
    KeyField := 'KEYFIELD';
    NotesField := 'Subject';

    NumberOfDays := 1;
    ReadOnly := true;

    NumberOfResources := m_lEmployees.Count;
    AutoHeaderUpdate:= true;

    OnFieldsToItem := DBDaySrcFieldsToItem;
    OnGetResourceName := DBDaySrcGetResourceName;
    OnResourceToPosition := DBDaySrcResourceToPosition;

couple of items having an extra field set will be changed to background items inside FieldsToItem-function.

The database will be refreshed each xxx min, after the database refreshed GUI refresh will be forced by means of SynchDBItems call.
(because the tables will be cleaned and filled new partially)
All items except of background items will be processed correctly.
Background items (they will set as background so:
  with item do
    CaptionType := ctNone;
    Background := true;
    AllowOverlap := true;
    Alignment := taCenter;
    Visible := true;

Could you start with this information or do you need more input?