I saw your samples and this bug does not seem to happen.
But in my project I created a appointment with start date in 28/05/2012 and the end date in 31/05/2012. This appointment appears in the week view but it doesn't appear on the day view.
I have the all day area active but when I change from the week to the day view the appointment appears and then disappears. That is very strange.
Here is the code of the scheduler view user control:
<
telerik:RadScheduleView
x:Name
=
"SchedulerView1"
telerik:StyleManager.Theme
=
"Metro"
HorizontalScrollBarVisibility
=
"Visible"
VerticalScrollBarVisibility
=
"Visible"
VerticalAlignment
=
"Top"
CurrentDate
=
"{Binding ScheduleSelectedDate, Mode=TwoWay}"
SnapAppointments
=
"True"
ShowCurrentTimeIndicator
=
"True"
AppointmentsSource
=
"{Binding Appointments}"
FirstDayOfWeek
=
"Monday"
VerticalOffset
=
"300"
FontSize
=
"10"
FontFamily
=
"Verdana"
ActiveViewDefinitionIndex
=
"1"
TimeRulerItemTemplate
=
"{StaticResource TimeRulerItemDataTemplate}"
GroupHeaderContentTemplate
=
"{StaticResource GroupHeaderDataTemplate}"
TimeMarkersSource
=
"{Binding TimeMarkerCollection}"
CategoriesSource
=
"{Binding CategoriesCollection}"
ResourceTypesSource
=
"{Binding ResourceTypesCollection, Mode=TwoWay}"
EditAppointmentDialogStyle
=
"{StaticResource EditAppointmentDialogStyle}"
SelectedAppointment
=
"{Binding SelectedAppointmentBinding, Mode=TwoWay}"
AppointmentDeleted
=
"scheduleView_AppointmentDeleted"
AppointmentEdited
=
"scheduleView_AppointmentEdited"
AppointmentCreated
=
"scheduleView_AppointmentCreated"
AppointmentCreating
=
"SchedulerView1_AppointmentCreating"
ToolTipTemplate
=
"{StaticResource AppointmentToolTipTemplate}"
VisibleRangeChangedCommand
=
"{Binding VisibleRangeChanged}"
VisibleRangeChangedCommandParameter
=
"{Binding VisibleRange, RelativeSource={RelativeSource Self}}"
AppointmentEditing
=
"SchedulerView1_AppointmentEditing"
AppointmentItemContentTemplate
=
"{StaticResource AppointmentTemplate}"
>
<
telerik:RadScheduleView.DragDropBehavior
>
<
common:ScheduleViewDragDropBehavior
/>
</
telerik:RadScheduleView.DragDropBehavior
>
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:DayViewDefinition
TimerulerMajorTickStringFormat
=
"{}{0:HH}:{0:mm}"
GroupHeaderDateStringFormat
=
"{}{0:dddd (dd-MM)}"
ShowAllDayArea
=
"True"
MajorTickLength
=
"1h"
MinorTickLength
=
"30min"
MinTimeRulerExtent
=
"800"
AppointmentFilter
=
"{Binding AppoitmentsFilter}"
EnableSmallAppointmentRendering
=
"True"
/>
<
telerik:WeekViewDefinition
TimerulerMajorTickStringFormat
=
"{}{0:HH}:{0:mm}"
GroupHeaderDateStringFormat
=
"{}{0:dddd (dd-MM)}"
ShowAllDayArea
=
"True"
MajorTickLength
=
"1h"
MinorTickLength
=
"30min"
MinTimeRulerExtent
=
"800"
AppointmentFilter
=
"{Binding AppoitmentsFilter}"
EnableSmallAppointmentRendering
=
"True"
/>
<
telerik:MonthViewDefinition
AppointmentFilter
=
"{Binding AppoitmentsFilter}"
/>
</
telerik:RadScheduleView.ViewDefinitions
>
</
telerik:RadScheduleView
>
Can you help me?
Thanks.
Filipe
18 Answers, 1 is accepted
i notice in your ViewDefinitions you have Appointment spelled incorrectly. Replace your ViewDefinition code with this.
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:DayViewDefinition
TimerulerMajorTickStringFormat
=
"{}{0:HH}:{0:mm}"
GroupHeaderDateStringFormat
=
"{}{0:dddd (dd-MM)}"
ShowAllDayArea
=
"True"
MajorTickLength
=
"1h"
MinorTickLength
=
"30min"
MinTimeRulerExtent
=
"800"
AppointmentFilter
=
"{Binding AppointmentFilter}"
EnableSmallAppointmentRendering
=
"True"
/>
<
telerik:WeekViewDefinition
TimerulerMajorTickStringFormat
=
"{}{0:HH}:{0:mm}"
GroupHeaderDateStringFormat
=
"{}{0:dddd (dd-MM)}"
ShowAllDayArea
=
"True"
MajorTickLength
=
"1h"
MinorTickLength
=
"30min"
MinTimeRulerExtent
=
"800"
AppointmentFilter
=
"{Binding AppointmentFilter}"
EnableSmallAppointmentRendering
=
"True"
/>
<
telerik:MonthViewDefinition
AppointmentFilter
=
"{Binding AppointmentFilter}"
/>
</
telerik:RadScheduleView.ViewDefinitions
>
</
telerik:RadScheduleView
>
No, that is not a error. I copied from your Appointment Filtering Sample and in your sample is also like that. But it works fine the filtering.
The problem is only with multiple days appointments on the dayview. They have a strange behavior. For a fraction of a second they appear and disappear.
Appointments with the flag isallday active , are working fine and the appointment goes to the allday area.
Now, my code is like this:
<
telerik:RadScheduleView
x:Name
=
"SchedulerView1"
telerik:StyleManager.Theme
=
"Metro"
HorizontalScrollBarVisibility
=
"Visible"
VerticalScrollBarVisibility
=
"Visible"
VerticalAlignment
=
"Top"
CurrentDate
=
"{Binding ScheduleSelectedDate, Mode=TwoWay}"
SnapAppointments
=
"True"
ShowCurrentTimeIndicator
=
"True"
AppointmentsSource
=
"{Binding Appointments}"
FirstDayOfWeek
=
"Monday"
VerticalOffset
=
"300"
FontSize
=
"10"
FontFamily
=
"Verdana"
ActiveViewDefinitionIndex
=
"1"
TimeRulerItemTemplate
=
"{StaticResource TimeRulerItemDataTemplate}"
GroupHeaderContentTemplateSelector
=
"{StaticResource GroupHeaderTemplateSelector}"
TimeMarkersSource
=
"{Binding TimeMarkerCollection}"
CategoriesSource
=
"{Binding CategoriesCollection}"
ResourceTypesSource
=
"{Binding ResourceTypesCollection, Mode=TwoWay}"
EditAppointmentDialogStyle
=
"{StaticResource EditAppointmentDialogStyle}"
SelectedAppointment
=
"{Binding SelectedAppointmentBinding, Mode=TwoWay}"
AppointmentDeleted
=
"scheduleView_AppointmentDeleted"
AppointmentEdited
=
"scheduleView_AppointmentEdited"
AppointmentCreated
=
"scheduleView_AppointmentCreated"
AppointmentCreating
=
"SchedulerView1_AppointmentCreating"
ToolTipTemplate
=
"{StaticResource AppointmentToolTipTemplate}"
VisibleRangeChangedCommand
=
"{Binding VisibleRangeChanged}"
VisibleRangeChangedCommandParameter
=
"{Binding VisibleRange, RelativeSource={RelativeSource Self}}"
AppointmentEditing
=
"SchedulerView1_AppointmentEditing"
AppointmentItemContentTemplate
=
"{StaticResource AppointmentTemplate}"
>
<
telerik:RadScheduleView.DragDropBehavior
>
<
common:ScheduleViewDragDropBehavior
/>
</
telerik:RadScheduleView.DragDropBehavior
>
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:DayViewDefinition
TimerulerMajorTickStringFormat
=
"{}{0:HH}:{0:mm}"
GroupHeaderDateStringFormat
=
"{}{0:dddd (dd-MM)}"
ShowAllDayArea
=
"True"
MajorTickLength
=
"1h"
MinorTickLength
=
"30min"
MinTimeRulerExtent
=
"800"
Orientation
=
"Vertical"
AppointmentFilter
=
"{Binding AppointmentsFilter}"
EnableSmallAppointmentRendering
=
"True"
/>
<
telerik:WeekViewDefinition
TimerulerMajorTickStringFormat
=
"{}{0:HH}:{0:mm}"
GroupHeaderDateStringFormat
=
"{}{0:dddd (dd-MM)}"
ShowAllDayArea
=
"True"
Orientation
=
"Vertical"
MajorTickLength
=
"1h"
MinorTickLength
=
"30min"
MinTimeRulerExtent
=
"800"
AppointmentFilter
=
"{Binding AppointmentsFilter}"
EnableSmallAppointmentRendering
=
"True"
WeekGroupHeaderStringFormat
=
"Semana {0}, {1:MM yyyy}"
>
</
telerik:WeekViewDefinition
>
<
telerik:MonthViewDefinition
AppointmentFilter
=
"{Binding AppointmentsFilter}"
/>
</
telerik:RadScheduleView.ViewDefinitions
>
</
telerik:RadScheduleView
>
Thanks
Filipe
I used your direct template and came up with this solution. Replace your ViewDefinition code with this and let me know if it solves your problem. It works on my end.
<
scheduleView:RadScheduleView.ViewDefinitions
>
<
scheduleView:DayViewDefinition
TimerulerMajorTickStringFormat
=
"{}{0:HH}:{0:mm}"
GroupHeaderDateStringFormat
=
"{}{0:dddd (dd-MM)}"
ShowAllDayArea
=
"True"
MajorTickLength
=
"1h"
MinorTickLength
=
"30min"
MinTimeRulerExtent
=
"800"
Orientation
=
"Vertical"
AppointmentFilter
=
"{Binding AppointmentsFilter}"
EnableSmallAppointmentRendering
=
"True"
/>
<
scheduleView:WeekViewDefinition
TimerulerMajorTickStringFormat
=
"{}{0:HH}:{0:mm}"
GroupHeaderDateStringFormat
=
"{}{0:dddd (dd-MM)}"
ShowAllDayArea
=
"True"
Orientation
=
"Vertical"
MajorTickLength
=
"1h"
MinorTickLength
=
"30min"
MinTimeRulerExtent
=
"800"
AppointmentFilter
=
"{Binding AppointmentsFilter}"
EnableSmallAppointmentRendering
=
"True"
WeekGroupHeaderStringFormat
=
"Semana {0}, {1:MM yyyy}"
/>
<
scheduleView:MonthViewDefinition
AppointmentFilter
=
"{Binding AppoitmentsFilter}"
/>
<
scheduleView:TimelineViewDefinition
AppointmentFilter
=
"{Binding AppoitmentsFilter}"
MinTimeRulerExtent
=
"16800"
/>
</
scheduleView:RadScheduleView.ViewDefinitions
>
The code you sent is pratically the same I had. The only difference I saw was the timeline view that I didn't have.
I copied your code, and it had the same behavior.
The multiple day appointment still doesn't appear on the dayview definition.
Filipe
We've tested the provided code but were not able to reproduce the issue as well. Can you please send us a short video showing the exact steps (you can use Jing)? You should either open a support ticket and attach it there or upload it to an external server and send us the link.
Thanks in advance
Regards,
Yana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I made the video with the help of jing as you suggested. The link is http://screencast.com/t/bvu77wvJNRpD .
Thanks
Filipe
Thank you for sending the video.
I've tried to reproduced it but still without much success. It seems that you've made some cusomizations to the ScheduleView. so it will be best if you send us a simple runnable project reproducing the problem. Please open a support ticket and attach it there.
Thanks in advance.
All the best,
Yana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Problem solved.
I was using Visible Range to get the Appointments from the database, but I didn't notice that on the day view, the range is just that day. So the appointment was out of that range because I was using Appointment StartDate >= VisibleRange Start and Appointment EndDate <= VisibleRange End. That obviously doesn't bring the multiple day appointment.
After all it was easy to solve, and maybe because it was easy, I didn't checked right from the start.
Sorry for wasting your time.
Thanks for your commitment helping me.
You can close this issue.
Filipe
Can you guide me how did you solve your issue?
I am getting same issue but I have nothing to identify whether date range is correct or not. As per shown in below code, I can restrict wrong appointment generation.But problem is that this.ActiveViewDefinitionIndex is going to change after multiple times event fire .So again code will not work properly for me.
private void OnVisibleRangeChanged(object arg)
{
if (!DesignerProperties.IsInDesignTool)
{
DateSpan rangeValue = ((DateSpan)(arg));
if (rangeValue != null)
{
short days = (short)(rangeValue.End - rangeValue.Start).TotalDays;
if (this.ActiveViewDefinitionIndex == WEEK_VIEW_INDEX && days!=7)
{
return;
}
if (this.ActiveViewDefinitionIndex == DAY_VIEW_INDEX && days != 1)
{
return;
}
if (this.ActiveViewDefinitionIndex == MONTH_VIEW_INDEX && days < 27)// for Leap year
{
return;
}
this.GenerateAppointments(arg as DateSpan);
}
}
}
Please help me out for the same.
Thanks in Advance,
Shimoli Shah
In the xaml, i have this code on the RadSchedulerView properties:
VisibleRangeChangedCommand="{Binding VisibleRangeChanged}"
VisibleRangeChangedCommandParameter="{Binding VisibleRange, RelativeSource={RelativeSource Self}}"
In the view model i have this:
public ICommand VisibleRangeChanged
{
get
{
return this.visibleRangeChanged;
}
set
{
this.visibleRangeChanged = value;
}
}
public void defineCommands()
{
this.VisibleRangeChanged = new Telerik.Windows.Controls.DelegateCommand(this.OnVisibleRangeExecuted, this.OnVisibleRangeCanExecute);
}
private void OnVisibleRangeExecuted(object param)
{
// The param is bound to the VisibleRange property in XAML
//
IDateSpan _dateSpan = param as IDateSpan;
GetActivitySchedulesFromDateSpanAsync(_dateSpan);
}
The GetActivityScheduleFromDateSpanAsync is a call to my WCF.
This function in the server side, goes to the database and gets the appointments between start and end date. My problem was on the conditions of the start and end dates of the appointment.
I was using StartTime >= _dateSpan.Start && EndTime <= _dateSpan.End.
That was incorrect. A multiple day appointment may have a start time inferior to the start of the day selected and could have a end time superior to the end of the day selected in the scheduler.
So i changed the conditions so that I could catch all the appointments that had that day inside the period or that were inside that day. The new conditions were :
((s.StartTime <= _dateSpan.Start
&& s.EndTime >= _dateSpan.End && s.EndTime >= _dateSpan.Start )
|| (s.StartTime >= _dateSpan.Start
&& s.EndTime <= _dateSpan.End)
|| (s.StartTime >= _dateSpan.Start
&& s.EndTime >= _dateSpan.End && s.StartTime <= _dateSpan.End)
|| (s.StartTime <= _dateSpan.Start && s.EndTime >= _dateSpan.End)
|| (s.StartTime <= _dateSpan.Start && s.EndTime <= _dateSpan.End && s.EndTime >= _dateSpan.Start ))
I hope this helps !
Filipe
This may not relate to this question, but this also regarding multiple days.
I want to display specific days in RadScheduleView. Like;
1st January, 5th January, 8 January (01/01/2015 .....)
I gather SelectedDates from RadCalendar. I have
<
telerik:DayViewDefinition
Title
=
"Multi Days"
/>
radScheduleDetails.ViewDefinitions[4]
Any workaround for achieve specific multiple day in RadScheduleView?
This may not relate to this question, but this also regarding multiple days.
I want to display specific days in RadScheduleView. Like;
1st January, 5th January, 8 January (01/01/2015 .....)
I gather SelectedDates from RadCalendar.
I have
<
telerik:DayViewDefinition
Title
=
"Multi Days"
/>
radScheduleDetails.ViewDefinitions[4]
Any workaround for achieve specific multiple days in RadScheduleView?
You can use GroupFilter in order to show only the required days. For sample implementation please check the following demo from our online Silverlight demos:
http://demos.telerik.com/silverlight/#ScheduleView/Grouping/Filtering
Hope this helps.
Regards,
Kalin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Could you please give me little example ? still i wasn't able to achieve this.
I just need a workaround for this group filter, Group filter binding done as example. below view model method call using Rad calendar selection change event.
public void UpdateSelectedDates()
{
SelectedDateFilter = new Func<
object
, bool>(SelectedDatesFilterFunc);
}
private bool SelectedDatesFilterFunc(object selectedDates)
{
if (selectedDates is DateTime)
{
return ((DateTime)selectedDates).Day == SelectedDates[SelectedDates.Count-1].Day;
}
// }
return true;
}
Please find attached a sample project demonstrating how to use implement such a scenario.
Hope this helps.
Regards,
Kalin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Thank you very much. This is really helpful.
This question also related to previous one. I want to select dates backward and show them on scheduler (Ex: 14th Jan, 10th Jan, 5th Jan). In my "Calendars_OnSelectionChanged" event I set,
radScheduleDetails.CurrentDate = Calendars.SelectedDates[0];
My view definition for this multiple day select is,
<
telerik:WeekViewDefinition
Title
=
"Multi Days"
GroupFilter
=
"{Binding SelectedDateFilter}"
VisibleDays
=
"365"
GroupHeaderDateStringFormat
=
"{}{0:dddd(MM/dd/yyyy)}"
/>
How can i achieve backward day selection ?
Try setting the CurrentDate property of the ScheduleView to first of January 2015. This way you will be see the whole year ahead.
Hope this helps.
Regards,
Kalin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.