This is a migrated thread and some comments may be shown as answers.
ResourceTypeCollection Resources
0 Answers 20 Views
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?

Asked by
Alexis
Top achievements
Rank 1
Share this question
or