Edit Dialog Resource ComboBox

3 posts, 0 answers
  1. Aaron
    Aaron avatar
    29 posts
    Member since:
    May 2011

    Posted 11 Apr 2012 Link to this post


    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,

    - Aaron
  2. Aaron
    Aaron avatar
    29 posts
    Member since:
    May 2011

    Posted 12 Apr 2012 Link to this post

    To clarify, I'm using the SqlAppointment class described in the RadScheduleView documentation.
  3. DevCraft R3 2016 release webinar banner
  4. Yana
    Yana avatar
    4547 posts

    Posted 18 Apr 2012 Link to this post

    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.

    the Telerik team

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

Back to Top