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

ResourceType in AppointmentCreating

4 Answers 55 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Arian
Top achievements
Rank 1
Arian asked on 31 Jul 2013, 04:55 AM
In a Silverlight app using the RadScheduleView, in the AppointmentCreating event, I'm trying to create a new appointment, but I can't see how to determine which ResourceType (column) they double-clicked in.  SelectedSlot is null, and the Resources list shows a blank DisplayName and ResourceName, though the ResourceType is filled out.  is this a bug or am I doing something wrong?

Thanks!
-Arian

4 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 31 Jul 2013, 11:18 AM
Hello,

When an user doubleclick the slot and the appointment dialog is open the SelectedSlot property should not be null. To isolate the problem I suggest you send us sample running project to test it locally. Also can you reproduce the problem with our online demo here?

Regards,
Rosi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Arian
Top achievements
Rank 1
answered on 31 Jul 2013, 07:46 PM
I have the control wired up in XAML like this:

<telerikScheduler:RadScheduleView x:Name="PracticeCalendar" SelectedAppointment="{Binding SelectedPractice, Mode=TwoWay}"
ResourceTypesSource="{Binding ResourceTypeCollection}" AppointmentsSource="{Binding PracticesCollection}" >
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="AppointmentCreating">
            <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding CreatingPracticeCommand}" PassEventArgsToCommand="True"/>
        </i:EventTrigger>
Then in the event handler, I have this:

private void CreatingPractice(AppointmentCreatingEventArgs args)
{
    var slot = (args.Source as RadScheduleView).SelectedSlot;

I get a null for "slot" so I just don't know where to find the Resource Type of the column where the user double-clicked.  Every field related to Resource just has the ResourceType field populated.
0
Arian
Top achievements
Rank 1
answered on 31 Jul 2013, 11:43 PM
After further digging, I saw that we had a similar function working on another page.  I tracked it all down to the CollectionChanged event handler on a Resources collection (the IList Resources property is implemented as an ObservableCollection).  The collection gets added to when double-clicked on one calendar, but not the other, even though both have nearly identical XAML declarations and resource collections.  Does this help narrow anything down?
0
Rosi
Telerik team
answered on 05 Aug 2013, 06:50 AM
Hi,

Can you try removing the following binding and tell us does the problem still persist?
SelectedAppointment="{Binding SelectedPractice, Mode=TwoWay}"

Regards,
Rosi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ScheduleView
Asked by
Arian
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Arian
Top achievements
Rank 1
Share this question
or