This is a migrated thread and some comments may be shown as answers.

TimelineView : Group column size and DayStartTime

8 Answers 181 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
bash
Top achievements
Rank 1
bash asked on 25 Mar 2010, 04:53 PM
Hello -
Trying to use the TimelineView -

First Question: How do I set the width of the Grouping column?  (Screenshot #1, the column that says "TP Room" is too small).

Second Question:
I would like the Timeline to show only the availability hours between 7 AM to 23 PM.
I've set DayStartTime="07:00:00" DayEndTime="23:00:00" and also WorkDayStartTime="07:00:00" WorkDayEndTime="23:00:00".
But still when I navigate back 1 day, it will show the hours just before 7 AM (see Screeshot #2).

Also when I use the Date Picker to select a random date, it will display from 00 AM, and not from 7 AM to 23 PM as specified...

Here is my ASP code:
        <telerik:RadScheduler ID="RadScheduler1" runat="server" SelectedView="TimelineView" ColumnWidth="60px" 
            SelectedDate="2010-03-24 07:00:00" DayStartTime="07:00:00" DayEndTime="23:00:00" 
            DataSourceID="MeetingsDataSource" DataKeyField="MeetingID" DataStartField="StartDate" 
            DataEndField="EndDate" DataDescriptionField="Subject" DataSubjectField="Subject"
            <TimelineView SlotDuration="01:00:00" NumberOfSlots="16" GroupBy="Room" GroupingDirection="Vertical" 
                ShowDateHeaders="true" ColumnHeaderDateFormat=" H" /> 
            <ResourceTypes> 
                <telerik:ResourceType DataSourceID="RoomsDataSource" ForeignKeyField="RoomID" 
                    KeyField="RoomID" Name="Room" TextField="RoomName" /> 
            </ResourceTypes> 
        </telerik:RadScheduler> 

cheers!
 -bash

8 Answers, 1 is accepted

Sort by
0
bash
Top achievements
Rank 1
answered on 25 Mar 2010, 08:14 PM
I've corrected my Second issue by overriding the NavigationComplete event:

    protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) 
    { 
        RadScheduler sheduler = (RadScheduler)sender; 
        sheduler.SelectedDate =  
            sheduler.SelectedDate.Hour >= sheduler.DayEndTime.Hours ?               // Did we go over the End Time (23 PM)? 
            sheduler.SelectedDate.Date.AddHours(24 + sheduler.DayStartTime.Hours)   // if we did, we want the Next Day at 7 AM. 
            : sheduler.SelectedDate.Date.AddHours(sheduler.DayStartTime.Hours);     // in other case, we want the Current Day at 7 AM. 
    } 

Isn't there an easier way though??

cheers!
 -bash
0
Peter
Telerik team
answered on 29 Mar 2010, 02:01 PM
Hello bash,

1. Normally, you should be able to control the resource column width with the RowHeaderWidth property. However, there is a glitch currently with this property and until we fix it I suggest you use the following css:

.rsTimelineView .rsVerticalHeaderTable div 
     
          width: auto !important;   
          text-align:center !important;  
     }

2. This functionality is not supported out-of-the-box, but your workaround is quite fine. I would recommend the same approach as well.


Greetings,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
bash
Top achievements
Rank 1
answered on 29 Mar 2010, 08:00 PM
Your solution didn't quite work because there is a sorrounding <div class="rsInnerFix" style="overflow:hidden;"> that hid any larger widths.

But you sent me in the right direction - I used the following CSS to do the work:

.rsTimelineView .rsVerticalHeaderWrapper div 
{  
      width150px !important;    
      text-align:center !important;   

Thanks for your help!
 -bash
0
Peter
Telerik team
answered on 30 Mar 2010, 11:58 AM

Right, the css selector is the important part. You can set any other css attributes if needed.


Regards,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Gus Oakes
Top achievements
Rank 1
answered on 08 Apr 2010, 09:35 PM
I too am trying to get the timeline view to be limited to the "day hours". It always just shows 12:00AM-11:30PM. I have tried to set the DayStartTime and WorkDayStartTime both on the tag and through code in Page Load. I have disabled the navigation pane, so there is no issue with changing days. I just need it to limit the hours displayed on the one day I'm looking at. How can I get this done? Here is the code I am using:

        RadScheduler1.SelectedView = SchedulerViewType.TimelineView 
        RadScheduler1.TimelineView.SlotDuration = New TimeSpan(0, 30, 0) 
        RadScheduler1.TimelineView.NumberOfSlots = 48 
        RadScheduler1.TimelineView.GroupingDirection = GroupingDirection.Vertical 
        RadScheduler1.ShowViewTabs = False 
        RadScheduler1.ShowNavigationPane = False 
        RadScheduler1.ReadOnly = True 
        RadScheduler1.OverflowBehavior = OverflowBehavior.Expand 
        RadScheduler1.ColumnWidth = 80 
        RadScheduler1.DayStartTime = New TimeSpan(8, 0, 0) 
        RadScheduler1.DayEndTime = New TimeSpan(18, 0, 0) 
        RadScheduler1.WorkDayStartTime = New TimeSpan(8, 0, 0) 
        RadScheduler1.WorkDayEndTime = New TimeSpan(18, 0, 0) 
        RadScheduler1.TimelineView.ColumnHeaderDateFormat = "h:mm" 
 


0
Peter
Telerik team
answered on 14 Apr 2010, 11:41 AM
Hello Gus,

You can achieve this requirement only for a single day (NumberOfSlots="10"). Here is how:

<telerik:RadScheduler ID="RadScheduler1" runat="server" OnNavigationComplete="RadScheduler1_NavigationComplete"
      SelectedView="TimelineView">
      <TimelineView SlotDuration="01:00:00" StartTime="08:00:00" NumberOfSlots="10" ColumnHeaderDateFormat="h:mm" />
  </telerik:RadScheduler>

protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
  {
      if (RadScheduler1.SelectedView == SchedulerViewType.TimelineView)
      {
          if (e.Command == SchedulerNavigationCommand.NavigateToNextPeriod)
              RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(14);
          else if (e.Command == SchedulerNavigationCommand.NavigateToPreviousPeriod)
              RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(-14);
      }
  }


Best wishes,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
nte
Top achievements
Rank 1
answered on 10 Jun 2010, 10:31 AM
Hello

We are trying to do that for several days... do you plan to allow this functionnality in a futur version ?

Thanks,

Regards,
Olivier
0
T. Tsonev
Telerik team
answered on 10 Jun 2010, 01:34 PM
Hi,

We haven't considered implementing such "working hours" functionality in TimelineView. We'll log it for future consideration, but this view is generally focused on showing continuous time ranges. Maybe some different view type will suit this requirement better.

Kind regards,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Scheduler
Asked by
bash
Top achievements
Rank 1
Answers by
bash
Top achievements
Rank 1
Peter
Telerik team
Gus Oakes
Top achievements
Rank 1
nte
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or