ResourceTypeCollection Resources

1 posts, 0 answers
  1. Alexis
    Alexis avatar
    1 posts
    Member since:
    May 2012

    Posted 21 May 2012 Link to this post

    Hello,

    I'm using RadScheduleView control and can not get to add / remove Resources for grouping through code-behind. However if I add it in the XAML, if you let me. The fact is that I need to add / remove Resources as the number of items that receipt of a WCF. This is snippet of how I add / remove Resources: 

    var rtc = radScheduleView.ResourceTypesSource as ResourceTypeCollection;
     
    var rt = rtc[0];
                 
    var appoints = ((InspectoresCalendarViewModel) DataContext).Appointments;
     
    foreach (var appoint in appoints)
    {
        rt.Resources.Add(new Resource(appoint.Inspector));
    }
     
    rtc.Remove(rt);
    rtc.Add(rt);
     
    radScheduleView.ResourceTypesSource = rtc;

    Need help.
    Thank you. 
Back to Top