Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Items not showing when spanning days (Read 10232 times)
Damian
Guest


Items not showing when spanning days
Apr 25th, 2006 at 12:12pm
Print Post  
Hi,

If i add an item that starts at say 21:00 on the 25th and finishes at 15:00 on the 26th it should add an item in both day columns but it doesnt even display.

I have got the header switced off as i dont want this and in timetable view.  The items are definitely adding to the schedule though.

Just tried and if i switch the day header on the items span fine!
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Items not showing when spanning days
Reply #1 - Apr 25th, 2006 at 6:36pm
Print Post  
I've tested the same scenario here and it seems to work fine. Can you send me your application or your initialization code, so that I can experiment in more details.

Meppy
  
Back to top
 
IP Logged
 
Damian
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Apr 26th, 2006
Re: Items not showing when spanning days
Reply #2 - Apr 26th, 2006 at 9:37am
Print Post  
cal.TimetableSettings.ShowDayHeader = State.Enabled;

     cal.TimetableSettings.CellTime = resourceItem.DisplayMinsPerCell;
     cal.TimetableSettings.StartTime = (60 * resourceItem.StartTime.Hour) + resourceItem.StartTime.Minute;
     cal.TimetableSettings.EndTime = (60 * resourceItem.EndTime.Hour) + resourceItem.EndTime.Minute;
     cal.TimetableSettings.WorkTimeStartHour = resourceItem.WorkStart.Hour;
     cal.TimetableSettings.WorkTimeEndHour = resourceItem.WorkEnd.Hour;
     cal.TimetableSettings.TwelveHourFormat = State.Disabled;
     cal.TimetableSettings.HeaderDateFormat = "ddd dd MMM";

     cal.TimetableSettings.ColumnBandSize = 10;
     cal.ItemSettings.MoveBandSize = 10;

     AddDaysToCalendar();  ---- below ---

     cal.TimetableSettings.VisibleColumns = 5;

     cal.EndInit();

    private void AddDaysToCalendar()
    {
     cal.TimetableSettings.Dates.Clear();

     for (int i = 0; i < daysToDisplay; i++)
     {
       cal.TimetableSettings.Dates.Add(
         starttime + new TimeSpan(i, 0, 0, 0));         
     }
    }
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Items not showing when spanning days
Reply #3 - Apr 26th, 2006 at 10:36am
Print Post  
Cannot really reproduce the problem here. Undecided

Can you furthermore specify the resourceItem's property values as well as daysToDisplay and starttime? Do you create the item that don't get displayed by code or interactively?

Thanks for your cooperation.

Meppy
  
Back to top
 
IP Logged
 
Damian
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Apr 26th, 2006
Re: Items not showing when spanning days
Reply #4 - Apr 26th, 2006 at 2:57pm
Print Post  
The resource item is just whats linked to the calendar - and holds a start time and end time.  Days to display is just the number of days to display on the timetable.

Ive looked at this more and i can create the item by highlighting the cells spanning 2 days on the calendar and then typing.  This is ok. Well almost - i cant add an item to the calendar if i highlight > the same cell in the next day for some reason.  It just wont let me start typing.

The way it disappears is if i add an item to the calendar in a single cell and then open the item and set its end time to +1 day.  It then disappears when i return the the calendar.

Its just clicked that i didnt use your stock form for the item - but one i did myself! I'll go and double check the code on that form! I'll let you know what i find.

The item above though - not been able to add an item > 1 day is a problem ive recreated easily in a new simple project with this code in the form:

cal.TimetableSettings.ShowDayHeader = State.Disabled;

      cal.TimetableSettings.StartTime = (60 * 8);
      cal.TimetableSettings.EndTime = (60 * 21);
      cal.TimetableSettings.WorkTimeStartHour = 9;
      cal.TimetableSettings.WorkTimeEndHour = 17;
      cal.TimetableSettings.TwelveHourFormat = State.Disabled;
      cal.TimetableSettings.HeaderDateFormat = "ddd dd MMM";
     
      cal.TimetableSettings.ColumnBandSize = 10;
      cal.ItemSettings.MoveBandSize = 10;
     
      AddDaysToCalendar();
     
      cal.TimetableSettings.VisibleColumns = 5;
     
      cal.EndInit();
      
    }

    private void AddDaysToCalendar()
    {
     cal.TimetableSettings.Dates.Clear();

     for (int i = 0; i < 5; i++)
     {
       cal.TimetableSettings.Dates.Add(
         new DateTime(2006,04,26) + new TimeSpan(i, 0, 0, 0));
     }
    }

  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Items not showing when spanning days
Reply #5 - Apr 27th, 2006 at 4:30am
Print Post  
Items longer than or equal to 1 day are displayed only in the all-day header. Because the all-day header is disabled, setting the item's end to +1 day causes the item to disappear from the view. Maybe the inabillity to interactively create items ensues from the same reason. If you selected days spanning interval longer than or equal to 1 day and the all-day header is switched off, the item could not be created. Try selecting smaller intervals and see what happens.

Meppy
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Items not showing when spanning days
Reply #6 - Apr 27th, 2006 at 4:45am
Print Post  
If you want to enable the all-day header and still wish to prevent the items from 'falling off' the calendar, try using the following code in the ItemModifying event handler:

Code
Select All
if (e.NewStartTime < cal.GetFirstDate())
  e.Confirm = false;

if (e.NewEndTime > cal.GetLastDate())
  e.Confirm = false; 



Meppy
  
Back to top
 
IP Logged
 
tomk
YaBB Newbies
*
Offline


Yaos!

Posts: 29
Joined: Apr 25th, 2006
Re: Items not showing when spanning days
Reply #7 - Jul 12th, 2006 at 5:51pm
Print Post  

How much trouble would it be to alter/control the handling of Items so that making them 24 or more hours would never cause them to fall off the grid?

We have Planner.NET version 4, and in a timetable view with TimetableSettings.ShowDayHeader = State.Disabled, the control still "removes" items as soon as they get to 24 hours in length.  It doesn't seem to matter if they cross over the start or end dates, just they they happen to have that length.  In other words, we can push an Item so it ends after the end time (and we want this behavior, so that's great), but as soon as we make it 24 hours long it goes away, even though we don't have a concept of "all day" items.

Ideally we could set a property so you could keep your control as is but we could set that to a state so we could keep items on our grid.

Also I would like to note that in version 4 it looks like even when you have TwelveHourFormat.Enabled and showAM, the time scale hours draw as 1300pm, 1400 et al instead of 1pm, 2pm.  I probably should have put that as a separate note, but just thought of it...

Thanks!
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Items not showing when spanning days
Reply #8 - Jul 13th, 2006 at 4:34am
Print Post  
We will add a property in the next release to prevent items from disappearing when they are longer than 24 hours.

As for the TwelveHourFormat property, its behavior seems to be reversed, i.e. it displayes 12 hours when it is set to Disabled, and 24 hours when it is set to Enabled. This will also be fixed in the next release.

Meppy
  
Back to top
 
IP Logged
 
tomk
YaBB Newbies
*
Offline


Yaos!

Posts: 29
Joined: Apr 25th, 2006
Re: Items not showing when spanning days
Reply #9 - Jul 13th, 2006 at 4:11pm
Print Post  
Thanks Meppy, that would be ideal.
  
Back to top
 
IP Logged
 
tomk
YaBB Newbies
*
Offline


Yaos!

Posts: 29
Joined: Apr 25th, 2006
Re: Items not showing when spanning days
Reply #10 - Aug 16th, 2006 at 12:30pm
Print Post  
Any updates available where we have the ability to force 24-hour length items to draw inside the timetable grid?

Thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Items not showing when spanning days
Reply #11 - Aug 16th, 2006 at 1:16pm
Print Post  
Yes, I will post a link to a preliminary beta of the incoming version 4.1 until the end of the week.

Meppy
  
Back to top
 
IP Logged
 
tomk
YaBB Newbies
*
Offline


Yaos!

Posts: 29
Joined: Apr 25th, 2006
Re: Items not showing when spanning days
Reply #12 - Aug 24th, 2006 at 5:26pm
Print Post  

I set the TimetableSettings.EnableDayItems property to disabled, and the timetable now behaves exactly as we requested.  Thanks for this change.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint