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

Is it possible to handle 2 days with DayViewDefinition ?

2 Answers 95 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Catherine
Top achievements
Rank 1
Catherine asked on 28 Feb 2011, 07:25 PM
When I use the following code :

var view = RadScheduleView.ViewDefinitions[0] as DayViewDefinition;

 

 

 

if (view != null)

 

{

 

    view.DayStartTime =

 

new TimeSpan (0,0,0,0); // 0 day, 0 hour, 0 min, 0 sec

 

    view.DayEndTime = new TimeSpan (1,1,0,0); // 1 day, one hour, 0 min, 0 sec

}

Part of the hours are no longer visible from the RadScheduleView.
May you help me.

Please see the two screens.

Regards.
C.Leoni.

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 01 Mar 2011, 10:58 AM
Hello Catherine,

Thank you for the code snippet.

The RadScheduleView do not support showing more than 24 hours in the view. That is causing the problem. You could set the hours like so:

view.DayStartTime = TimeSpan.FromHours(0);
view.DayEndTime = TimeSpan.FromHours(24);

Hope this information helps. Please let us know if you have further questions.

Kind regards,
Konstantina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Catherine
Top achievements
Rank 1
answered on 01 Mar 2011, 11:19 AM
Hi,

Thanks for your reply.
I found a solution.
I used this following code code and it works.

var view = RadScheduleView.ViewDefinitions[0] as DayViewDefinition;
if (view != null)
{
     view.DayStartTime = new TimeSpan(0,6,0,0); // 0 day, 6 hours, 0 min, 0 sec
     view.DayEndTime = new TimeSpan(1,6,0,0); // 1 day, 6 hours, 0 min, 0 sec
}

Regards.
C.Léoni.
Tags
ScheduleView
Asked by
Catherine
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Catherine
Top achievements
Rank 1
Share this question
or