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

Change the amount of days in timeline view

6 Answers 90 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 08 Jun 2011, 05:17 PM
Is there any way to increase or decrease the amount of days that are shown in the timeline view? Currently it is one week but I'd like to be able to change it to 1 or 2 weeks and perhaps 1 month.

6 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 09 Jun 2011, 07:43 AM
Hello Scott,

You could use the VisibleDays property of the TimelineViewDefinition.

All the best,
Valeri Hristov
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
Scott
Top achievements
Rank 1
answered on 09 Jun 2011, 10:55 PM
That works great Valeri. I have the VisibleDays property bound to a slider and all works well except for one thing.

The date chooser at the top right of the control always scrolls by 7 days. So, for instance, I have VisibleDays set to 2 when the user presses the left or right arrows of the date chooser it always scrolls by 7 days.

Is there any way to have the date chooser skip days by the same setting as VisibleDays? Spcifically in the template I see this:
<telerik:RadButton Style="{StaticResource NavigationButtonBackStyle}" Command="local:RadScheduleViewCommands.DecreaseVisibleDateLarge" />
<telerik:RadDatePicker x:Name="PART_NavigationPicker" Style="{StaticResource NavigationDateTimePickerStyle}" SelectedValue="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CurrentDate, Mode=TwoWay}" />
<telerik:RadButton Style="{StaticResource NavigationButtonNextStyle}" Command="local:RadScheduleViewCommands.IncreaseVisibleDateLarge" />
The two RadButtons increase and decrease the date by 7 can this be changed to match the VisibleDate?
0
Valeri Hristov
Telerik team
answered on 14 Jun 2011, 07:43 AM
Hi Scott,

You need to set the SmallChangeInterval. It is of type Telerik.Windows.Controls.ScheduleView.DateTimeInterval so you will have to use a ValueConverter if you are binding it to the VisibleDays property...

Best wishes,
Valeri Hristov
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
Scott
Top achievements
Rank 1
answered on 14 Jun 2011, 05:13 PM
I actually needed to bind VisibleDays to LargeChangeInterval and that did the trick.
0
palak
Top achievements
Rank 1
answered on 21 Jun 2011, 08:17 AM

Hey guys,

i also want to move next/previous by 1 day in TimelineView. i give SmallChangeInterval="1", but it's giving me error.

System.Windows.Markup.XamlParseException occurred
  Message=Failed to create a 'Telerik.Windows.Controls.ScheduleView.DateTimeInterval' from the text '1'. [Line: 974 Position: 41]
  LineNumber=974
  LinePosition=41
  StackTrace:
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at HaiderSchedulerView.MainPage.InitializeComponent()
       at HaiderSchedulerView.MainPage..ctor()
  InnerException: System.FormatException
       Message=Invalid string passed as argument
       StackTrace:
            at Telerik.Windows.Controls.ScheduleView.DateTimeInterval.Parser.Parse(String str)
            at Telerik.Windows.Controls.ScheduleView.DateTimeInterval.Parse(String value)
            at Telerik.Windows.Controls.ScheduleView.Design.DateTimeIntervalConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
            at MS.Internal.XamlManagedRuntimeRPInvokes.CreateFromValue(IntPtr inServiceContext, XamlTypeToken inTs, XamlQualifiedObject& qoValue, XamlPropertyToken inProperty, XamlTypeToken inType, XamlQualifiedObject& qoRootInstance, XamlQualifiedObject& qo)
       InnerException:

what to do.

and also what is valueconverter, if it's needed, also guide how can i use it to get this done.

thank you

0
palak
Top achievements
Rank 1
answered on 21 Jun 2011, 08:25 AM
Hey guys,

it''s resolved, actually the format of value was causing error.
LargeChangeInterval="1d"


thanks & regards
Tags
ScheduleView
Asked by
Scott
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Scott
Top achievements
Rank 1
palak
Top achievements
Rank 1
Share this question
or