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

[Solved] Hide grouped resources for certain days in schedule

1 Answer 105 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gerhard
Top achievements
Rank 1
Gerhard asked on 01 Apr 2009, 01:41 PM
I'm using the scheduler for a webproject, which contains bookings for resources (employees). The resources are grouped by date. The problem is that there are a lot of resources, but not all of them works all dates. What I want to do is, when in the week view, hide the columns for resources that are not working certain days. Showing all the resources all the time takes up a lot of width and is harder to overview than just showing the resources for the days they actually work.

This is what I want to achieve:
http://img5.imageshack.us/img5/2805/radscheduleresources.jpg

In my example picture I show 5 resources the first day, but only 3 the other.

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 03 Apr 2009, 09:58 AM
Hello Gerhard,

Unfortunately there is no built-in functionality to hide given resource in a week view. This can be done manually with JavaScript and catching the OnTimeSlotCreated event of the scheduler. However solution is not scalable and would break the built in drag and drop functionality. What might be a better solution is to use DayView instead of WeekView. Given that you use DayView, you can hook on the DataBind event of the scheduler and then use the followind syntax to disable given resource for a given date:

protected void RadScheduler1_DataBound(object sender, EventArgs e) 
    { 
        //implement your deletion logic here 
        RadScheduler1.Resources.Remove(RadScheduler1.Resources.GetResource("Room", "2")); 
    } 

I have attached sample project reproducing the desired fucntionality.

All the best,
Genady Sergeev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Gerhard
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or