Resources ItemsControl

3 posts, 1 answers
  1. Karl
    Karl avatar
    5 posts
    Member since:
    May 2011

    Posted 27 Aug 2012 Link to this post


    we got an ObservableCollection of custom appointments with resources, which we would like to edit "outside" the RadScheduleView component in a seperate RadWindow containing a RadDataForm.
    For editing the resources we tried to use the ItemsControl "PART_Resources" as shown in the "Custom Appointment and Validation" sample. Unfortunately we did not manage to get the ItemsControl to work properly: The comboboxes are not shown and instead of them
    we got some lines showing "Telerik.Windows.Controls.ResourceType" (the number of lines corresponds to the number of resourcetypes we are using).

    Is it even possible to use the ItemsControl in that way (If yes, what are the requirement to get it running)?
    Is there a different / recommended approach to implement the above task?

    Thanks in advance!

    Kind regards,


  2. Answer
    Vladi avatar
    749 posts

    Posted 05 Sep 2012 Link to this post

    Hello Karl,

    When the EditAppointmentDialog displays the resources in its ItemsControl it expects that the passed item is of type ResourceTypeViewModel but in the scenario when accessing the resources from outside the control the item in the ItemsControl is of type ResourceType. All that is needed is to create a custom ResourceTypeTemplateSelector that inherits DataTemplateSelector and override its SelectTemplate method. Next you will need to make sure the bindings are correct.

    We created a sample project that represents the described approach with one ItemsControl and a ScheduleView with two resources. Give it a try.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Karl
    Karl avatar
    5 posts
    Member since:
    May 2011

    Posted 06 Sep 2012 Link to this post

    Hello Vladi,

    thanks for your help - works like a charm now.
    You definitely saved my day!

    Best regards,


Back to Top