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

Timeline Resource Grouping HELP

1 Answer 60 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Timothy Kruszewski
Top achievements
Rank 1
Timothy Kruszewski asked on 21 Apr 2010, 08:34 PM
protected void RadScheduler1_OnDataBound(object sender, EventArgs e)     
    {     
       //Clear all resources of type 'user':      
        foreach (Resource res in RadScheduler1.Resources.GetResourcesByType("User Name"))     
        {     
            RadScheduler1.Resources.Remove(res);     
        }      
       //Add resources of type 'user' that are in use for the visible range of RadScheduler:      
        foreach (Telerik.Web.UI.Appointment a in RadScheduler1.Appointments.GetAppointmentsInRange(RadScheduler1.VisibleRangeStart, RadScheduler1.VisibleRangeEnd))     
        {     
            RadScheduler1.Resources.Add(a.Resources.GetResourceByType("User Name"));     
        }      
    }    
 

After doing more testing I've noticed a problem with the code example I was provided.  It appears that for evey entry by a particular user for the given date range it adds that user to the group by view.  So in the screen shot I provided Gabe has 9 entries for the week and he is showing up 9 times in the group by view.  Here is the code I'm using

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 22 Apr 2010, 09:24 AM
Hello Timothy,

Make sure you're adding each resource only once to the Resource collection. This should solve the problem.

I hope this helps.

Best wishes,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Scheduler
Asked by
Timothy Kruszewski
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or