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)

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.
No Comments

Please login or register to post comments.