CustomGroups

I am using the code below, which i have amended from one of your demo apps and user guides. I am new to using this component and am struggling slightly to get to grips with it, due to the great flexibility and vast number of properties!

My problem is that the customgroups are not being displayed no matter what I seem to do. COuld you tell me if there is anything wrong with my code or another way to acheive this please.
 
MainPlanner.Header.CustomGroups.Clear;
  with MainPlanner.Header.CustomGroups.Add do
  begin
    Caption := 'TEst 1';
    Span := 2;
  end;
    with MainPlanner.Header.CustomGroups.Add do
  begin
    Caption := 'TEst 2';
    Span := 2;
  end;
  qryResources.Close;
  qryResources.SQL.Clear;
  qryResources.SQL.Add('SELECT * FROM SchedulerResources');
  qryResources.SQL.Add('WHERE SchedulerHeaderID = ' + cboSchedule.LookUpValue);
  qryResources.Open;
  PlannerPosition := 0;
  DBPeriodSource1.ResourceMap.Clear;
  while not qryResources.Eof do
  begin
    with DBPeriodSource1.ResourceMap.Add Do
    begin
       ResourceIndex := qryResources.FieldByName('ID').AsInteger;
       PositionIndex := PlannerPosition;
       DisplayName := qryResources.FieldByName('Name').AsString;
       inc(PlannerPosition);
    end;
    qryResources.Next;
  end;
  qryResources.Close;
  DBPeriodSource1.NumberOfResources := PlannerPosition;
 
On another issue, I want to be able to setup a config so that users can colour different resources on different days. What event is the best and most efficient to use for me to be able to implement the colouring of the empty cells?
 
Many thanks.