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

Edit Dialog Resource ComboBox

2 Answers 57 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 12 Apr 2012, 01:49 AM
Hi,

I need to be able to disable/enable certain resource ComboBoxes under certain conditions and also place them in different locations within the EditAppointmentDialog.  For those reasons, I'm not able to use the item control that automatically adds a resource ComboBox for each resource type.

I am able to add a ComboBox and display SqlResources in it as selectable items, but I cannot bind the selected item to the resource of the appointment being edited.

Here is the ComboBox from the EditAppointmentDialogStyle:

<telerik:RadComboBox Grid.Row="5" Grid.Column="1" Margin="3" 
    SelectedItem="{Binding Occurrence.Appointment.Staff, Mode=TwoWay}"
    ItemsSource="{Binding Source={StaticResource scheduleViewViewModel}, Path=StaffResources, Mode=OneWay}" />

"Staff" is the SqlResourceType of the appointment resource I'm trying to bind to.  The static resource "scheduleViewViewModel" is the name of the view model instance, and "StaffResources" is a collection of all the SqlResources that have the "Staff" SqlResourceType.

The binding for the ItemsSource property works, but the binding for the SelectedItem property does not.


Your help is much appreciated,
Thanks

- Aaron

2 Answers, 1 is accepted

Sort by
0
Aaron
Top achievements
Rank 1
answered on 12 Apr 2012, 04:54 PM
To clarify, I'm using the SqlAppointment class described in the RadScheduleView documentation.
0
Yana
Telerik team
answered on 18 Apr 2012, 01:46 PM
Hello Aaron,

You can try using a ValueConverter to find the selected Resource of the specific ResourceType from the Resources collection of Occurrence.Appointment.

Let us know whether this helps.

Regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
Aaron
Top achievements
Rank 1
Answers by
Aaron
Top achievements
Rank 1
Yana
Telerik team
Share this question
or