Hi Guys,
I'm struggling with this issue for a couple of day's now and I assume this is because I'm new to WPF. but I need some help with the following.
I am creating a custom planner, and for this I'm using the radschedular like this
<
telerik:RadScheduleView
x:Name
=
"MachineplanningScheduleView"
ActiveViewDefinitionIndex
=
"{Binding ActiveViewDefinitionIndex, Mode=TwoWay}"
CurrentDate
=
"{Binding SelectedDate, Mode=TwoWay}"
SelectedAppointment
=
"{Binding SelectedAppointment, Mode=TwoWay}"
ShowDialog
=
"ShowDialog"
AppointmentsSource
=
"{Binding Appointments}"
NavigationHeaderVisibility
=
"Collapsed"
GroupDescriptionsSource
=
"{Binding GroupDescriptions}"
GroupHeaderContentTemplateSelector
=
"{StaticResource GroupHeaderContentTemplateSelector}"
ResourceTypesSource
=
"{Binding ResourceTypes}"
>
The Binding Appointments works perfect and the calender gets updated when appointments get changed.
The ShowDialog function in the codebehind should do some database updates and then update the planning without showing the dialog.
The database updates are going fine, I can cancel the dialog and also I'm able to update the ResourceTypesSource like this
db.SaveChanges();
RadScheduleView rsv = (RadScheduleView)sender;
rsv.AppointmentsSource = MachineplanningViewModel.GetCalendarAppointments();
e.Cancel =
true
;
}
so my question is, how can I update "Appointments" directly from codebehind so I won't lose my binding.
I hope my explanation is clear and someone can help me.
Thank you.