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

ResourceTypeCollection Resources

0 Answers 45 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Alexis
Top achievements
Rank 1
Alexis asked on 21 May 2012, 12:56 PM
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. 

No answers yet. Maybe you can help?

Tags
ScheduleView
Asked by
Alexis
Top achievements
Rank 1
Share this question
or