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

Remove resource grouping

2 Answers 67 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 14 Dec 2009, 09:12 PM

My scheduler control has resources enabled. The resource list is quite lengthy, over 100 items. I found this article on implementing paging:

http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-implement-resource-paging.aspx

So I plan on implementing that functionality for the Day, Week, and Timeline views. However, my boss wants the Month view to have no grouping at all. So I'm trying to figure out the best way to accomplish that. So far I know I need to hook up to the NavigationComplete method like this:

        void conScheduler_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)  
        {  
            try 
            {  
                if (e.Command != SchedulerNavigationCommand.SwitchToMonthView)  
                {  
 
                }  
            }  
            catch (Exception ex) { lblError.Text = ex.ToString(); }  
        } 

But my question is - What is the proper syntax to remove the grouping settings?

This is what I set initially: 

 

conScheduler.GroupBy = "Resource";  
conScheduler.GroupingDirection = GroupingDirection.Vertical; 

 

So do I just clear it out like this:

conScheduler.GroupBy = "";

Or is there a better method?
**Note - I don't want to completely remove the resource from the resource collection. I only want to remove the grouping by the resource in the display. So when the user adds a new appointment or edits an appointment, they still are able to select a resource.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 1
answered on 22 Dec 2009, 03:47 PM
Anyone have any thoughts on this? Thanks.
0
T. Tsonev
Telerik team
answered on 23 Dec 2009, 11:44 AM
Hi Joe,

Your approach of setting GroupBy to an empty string will work fine. Maybe Navigation_Command is the more suitable event here, but I think you can solve the problem without writing any additional code.

You can set the GroupBy property for each view separately:

<telerik:RadScheduler runat="server" ID="RadScheduler1" >
    <AdvancedForm Modal="true" />
    <DayView GroupBy="Room" />
    <WeekView GroupBy="Room" />
    <TimelineView GroupBy="Room" />
</telerik:RadScheduler>

I hope this helps.

All the best,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Scheduler
Asked by
Joe
Top achievements
Rank 1
Answers by
Joe
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or