WinForms Scheduler - Resource Categories

WinForms Team Blog
16 October 2019

Our WinForms Scheduler Control can now arrange resources into categories. Resources that belong to a specific category can be presented as tabs or displayed as colored columns. This feature delivers two distinct benefits:

  • allows you to re-arrange resources and combine closely related resources into groups (in the figure below, business-related and personal resources are grouped into two separate categories);
  • allows you to create a more “space-efficient” user interface (when compared to our standard “group by resource” mode) and allows the Scheduler to display more resources on-screen.

To create categories, first set the GroupType property to “Resource”. Each category is an object of the DevExpress.XtraScheduler.ResourceCategory class. Scheduler stores these objects in its ResourceCategories collection. To place a resource into a category, you need to add it to the category’s Resources collection. The following code from the Scheduler Demo (Tabs demo module) arranges resources by their parent.

using System.Linq;
    
void GroupByParentId() {
    var categories = this.schedulerDataStorage1.Resources.Items
        // group resources by their parent resource IDs
        .GroupBy(x => x.ParentId ?? x.Id)
        // merge resources with equal parent IDs
        // into ResourceCategory objects
        .Select(x => new ResourceCategory(x));
     // add created ResourceCategories objects to the Scheduler
    foreach (ResourceCategory category in categories)
        Scheduler.ResourceCategories.Add(category);
}

Resources are displayed as tabs when the OptionsView.ResourceCategories.ResourceDisplayStyle property is set to Tabs. You can also set this property to Header to display standard resource headers. In this instance, headers display the names of all Resources for a given Category (separated by commas).

Note: if you set the ResourceDisplayStyle property to Tabs, but do not manually group resources, each resource will be automatically placed into a stand-alone category.

Your feedback matters

We’d love to know your thoughts on this new feature. Are there any additional features you’d like to see us add? Category captions? Close buttons in tab headers? Drag-and-drop functionality so that end-users could move resources between categories? Please share your thoughts in the comment section below.

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Gabriel Phaiphai
Gabriel Phaiphai
Awesome and long overdue. Hoping for similar feature parity on  MVC  and Webforms
16 October 2019
Christian Peters
Christian Peters
Nice feature. But it's missing the "RemoveFromGroup"-Button.
16 October 2019
Daniel Negele
Daniel Negele
Great feature. Do you plan to implement group and ungroup buttons? Similar to outlook?
17 October 2019
Dmitry (DevExpress)
Dmitry Korovin (DevExpress)
@Daniel Yes, we will implement this functionality in the near future.
17 October 2019
Sigurd Decroos _
Sigurd Decroos _

The same vertically in the timeline view would be nice.

And please, fix the timeline so each resource can have an individual height without having to set the number of visible items.

17 October 2019
Bert Stomphorst
Bert Stomphorst

I'm with Sigurd Decroos, please make the Timeline-view more space-efficiënt: auto-height of resources with min/max-values would make it great.

Now it's a crime when a user resizes his/her window, while it's necessary to increase/decrease the number of visible rows. 
Note: we're using the timeline view with 50-100 resources

17 October 2019
Walter Gumirato
Walter Gumirato

-spero che venga integrato in xaf

-spero che venga integrato nel nuovo controllo Gantt e che riesca a gestire il carico di lavoro x risorsa

wg

18 October 2019
Paolo KALC
Paolo KALC
Will this functionality be integrated in XAF?
18 October 2019
Robert Salomons
Robert Salomons
will this also work in the timeline view?
21 October 2019
Dmitry (DevExpress)
Dmitry Korovin (DevExpress)
@Robert at the moment no, categories are supported in "classic" Views only. However, we've already started working in this direction, stay tuned for updates.
22 October 2019
Dmitry (DevExpress)
Dmitry Korovin (DevExpress)

@Sigurd Decroos, Bert Stomphorst

Right now, I'd refrain from promising specific features, but we are definitely putting the effort in the Timeline View in 2020: there are numerous enhancements that have to be made. We will certainly keep resource auto-height requests in mind. Thank you for sharing this.

22 October 2019
Dennis (DevExpress)
Dennis Garavsky (DevExpress)
@Walter Gumirato, Paolo KALC: You can integrate this functionality in XAF and set required SchedulerControl properties at runtime as per How to: Access the List Editor's Control. Note that only developers can determine how they want to group resources depending on their resource properties and scenarios. If you expect any built-in integration from XAF, please describe your use-case scenarios and expected results for each case. You can attach screenshots to comments here, if you wish. Thanks.
22 October 2019

Please login or register to post comments.