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

Access controls of EditAppointmentDialog

5 Answers 38 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Art Kedzierski
Top achievements
Rank 2
Art Kedzierski asked on 03 Apr 2014, 06:44 PM
There used to be an article at http://www.telerik.com/help/silverlight/radscheduler-how-to-access-the-controls-in-the-editappointmentdialog.html that sounded exactly like what I needed, but the link is dead now. Has it moved?

Regardless, I have a custom appointment dialog with a RadListView of resources I would like to filter based on a RadComboBox in the same dialog (in an MVVM way). I can pre-populate the lists during Appointment_Creating and Appointment_Editing just fine, but how would I alter the values of those controls while the dialog is open? I'm using EventTriggers for other activities and that seemed reasonable, but those are a) outside of the appointment dialog itself (which is a very magical beast indeed) and b) I'm just not understanding how to reference the controls in the currently open dialog.

<telerik:RadComboBox x:Name="filter_Devices_List"
                        Grid.Row="1"
                        Grid.Column="2"
                        Margin="5,5,10,0"
                        ItemsSource="{Binding Occurrence.Appointment.LocationFilter}"
                        SelectedItem="{Binding Occurrence.Appointment.SelectedLocationFilter, Mode=TwoWay}"
                        SelectedValuePath="ID"
                        DisplayMemberPath="Name">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="SelectionChanged">
            <ei:CallMethodAction TargetObject="{Binding}"
                         MethodName="UpdateLocationFilter" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
</telerik:RadComboBox>
<telerik:RadListBox x:Name="_available_Devices_List"
                    Grid.Row="2"
                    Grid.Column="2"
                    Margin="5,0,10,5"
                    ItemTemplate="{StaticResource AvailableDevicesListItemTemplate}"
                    ItemsSource="{Binding Occurrence.Appointment.AvailableDevices}"
                    SelectedItem="{Binding Source={StaticResource ReservationDialogViewModel}, Path=SelectedAvailableDevice, Mode=TwoWay}"
                    SelectedValuePath="ID"></telerik:RadListBox>


5 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 07 Apr 2014, 11:52 AM
Hi Art,

The mentioned article was for the old RadScheduler control which is not available any more.

First, I'd like to note that EditAppointmentDialog is actually RadWindow and as such it it not in the same visual tree as the page, so the controls in it cannot be directly referenced.
However, I would suggest that you take a look at the following Code Library project:
How to Create Advanced Custom EditAppointmentDialog

which demonstrates a similar approach - how to update a property in the dialog based on the changes of another property.

Try it and if you have any issues/questions, let us know.

Regards,
Yana
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.

 
0
Art Kedzierski
Top achievements
Rank 2
answered on 07 Apr 2014, 02:29 PM
Do all the objects I want to manipulate need to be in the viewmodel of the RadWindow? Specifically, the ObservableCollection<> that populates the combobox, the object for the SelectedItem, as well as the ObservableCollection<> that is then filtered? 
0
Yana
Telerik team
answered on 09 Apr 2014, 02:10 PM
Hello Art,

The purpose of the EditAppointmentDIalog is to show the appointment properties, so you should either create a custom Appointment with these properties or add them to the dialog ViewModel. 

Regards,
Yana
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.

 
0
Art Kedzierski
Top achievements
Rank 2
answered on 09 Apr 2014, 04:34 PM
I have both a custom Appointment object AND a customized dialog ViewModel already. My confusion is: where is the best place to put the logic for the behavior I'm looking for? Specifically, within the custom appointment dialog, I want to filter a RadListBox using a RadComboxBox (see image). I've tried a number of different methods that should have worked, based on what you've said, but none do. 
0
Yana
Telerik team
answered on 14 Apr 2014, 01:45 PM
Hi Art,

Could you please isolate the scenario in a simpler project and send it to us, so we to be able to research the case further? You should open a support ticket and attach it there.

Thanks in advance.

Regards,
Yana
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.

 
Tags
ScheduleView
Asked by
Art Kedzierski
Top achievements
Rank 2
Answers by
Yana
Telerik team
Art Kedzierski
Top achievements
Rank 2
Share this question
or