-
Data Grid
- Overview
-
Data Binding
-
Paging and Scrolling
-
Editing
-
Grouping
-
Filtering and Sorting
- Focused Row
-
Row Drag & Drop
-
Selection
-
Columns
- State Persistence
-
Appearance
-
Templates
-
Data Summaries
-
Master-Detail
-
Export to PDF
-
Export to Excel
-
Adaptability
- Keyboard Navigation
-
Pivot Grid
- Overview
-
Data Binding
-
Field Chooser
-
Features
-
Export to Excel
-
Tree List
- Overview
-
Data Binding
- Sorting
- Paging
-
Editing
- Node Drag & Drop
- Focused Row
-
Selection
-
Filtering
-
Column Customization
- State Persistence
- Adaptability
- Keyboard Navigation
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Features
- Virtual Scrolling
-
Grouping
-
Customization
- Adaptability
-
Html Editor
-
Chat
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
Charts
- Overview
-
Data Binding
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Line Charts
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
-
Sparkline Charts
-
Tree Map
-
Funnel and Pyramid Charts
- Sankey Chart
-
Combinations
-
More Features
-
Export
-
Selection
-
Tooltips
-
Zooming
-
-
Gantt
- Overview
-
Data
-
UI Customization
- Strip Lines
- Export to PDF
- Sorting
-
Filtering
-
Gauges
- Overview
-
Data Binding
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Navigation
- Overview
- Accordion
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
- Pagination
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Resizable
-
-
Editors
- Overview
- Autocomplete
-
Calendar
- Check Box
- Color Box
- Date Box
-
Date Range Box
-
Drop Down Box
-
Number Box
-
Select Box
- Switch
-
Tag Box
- Text Area
- Text Box
- Validation
- Custom Text Editor Buttons
- Right-to-Left Support
- Editor Appearance Variants
-
Forms and Multi-Purpose
- Overview
- Button Group
- Field Set
-
Filter Builder
-
Form
- Radio Group
-
Range Selector
- Numeric Scale (Lightweight)
- Numeric Scale
- Date-Time Scale (Lightweight)
- Date-Time Scale
- Logarithmic Scale
- Discrete scale
- Custom Formatting
- Use Range Selection for Calculation
- Use Range Selection for Filtering
- Image on Background
- Chart on Background
- Customized Chart on Background
- Chart on Background with Series Template
- Range Slider
- Slider
-
Sortable
-
File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Actions and Lists
-
Maps
- Overview
-
Map
-
Vector Map
-
Dialogs and Notifications
-
Localization
Scheduler - Resources
Users can categorize appointments by resources. The following example illustrates what resources are: in an educational center lectures are held in several rooms. In Scheduler terms, room is a resource kind, individual rooms are resource instances, and lectures are appointments that use these resource instances.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
@model DevExtreme.MVC.Demos.ViewModels.SchedulerResourcesViewModel
@{
var resourcesList = new[] { "Assignee", "Room", "Priority" };
}
@(Html.DevExtreme().Scheduler()
.ID("scheduler")
.DataSource(Model.Appointments)
.TimeZone("America/Los_Angeles")
.Views(new[] { SchedulerViewType.WorkWeek })
.CurrentView(SchedulerViewType.WorkWeek)
.CurrentDate(new DateTime(2021, 4, 27))
.StartDayHour(9)
.EndDayHour(19)
.Resources(res => {
res.Add()
.FieldExpr("RoomId")
.ValueExpr("Id")
.ColorExpr("Color")
.Label("Room")
.DisplayExpr("Text")
.DataSource(Model.Rooms);
res.Add()
.FieldExpr("PriorityId")
.ValueExpr("Id")
.ColorExpr("Color")
.Label("Priority")
.DisplayExpr("Text")
.DataSource(Model.Priorities);
res.Add()
.FieldExpr("AssigneeId")
.ValueExpr("Id")
.ColorExpr("Color")
.Label("Assignee")
.DisplayExpr("Text")
.AllowMultiple(true)
.DataSource(Model.Assignees);
})
.Height(600)
.TextExpr("Text")
.StartDateExpr("StartDate")
.EndDateExpr("EndDate")
.AllDayExpr("AllDay")
.RecurrenceRuleExpr("RecurrenceRule")
.RecurrenceExceptionExpr("RecurrenceException")
)
<div class="options">
<div class="caption">Use colors of:</div>
<div class="option">
@(Html.DevExtreme().RadioGroup()
.Items(resourcesList)
.Value(resourcesList[0])
.Layout(Orientation.Horizontal)
.OnValueChanged("resources_valueChanged")
)
</div>
</div>
<script>
function resources_valueChanged(e) {
var scheduler = $("#scheduler").dxScheduler("instance"),
resources = scheduler.option("resources");
for(var i = 0; i < resources.length; i++) {
resources[i].useColorAsDefault = resources[i].label == e.value;
}
scheduler.repaint();
}
</script>
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
Define Resource Kinds
Use the resources array to define resource kinds. Each object in this array should contain at least the following fields:
-
dataSource
Resource instances of this resource kind. Each instance should contain theid
,text
, andcolor
fields. If your field names differ, specify them in the valueExpr, displayExpr, and colorExpr properties, respectively. -
fieldExpr
A data field used to assign instances of this resource kind to appointments. Add this field to appointment objects and set the field values toid
values of resource instances.
In this demo, the resources array contains three resource kinds: rooms, priorities, and assignees. Their fieldExpr values are roomId
, priorityId
, and assigneeId
, respectively. Each appointment contains the same fields. Field values assign the appointments to different instances of these resource kinds.
Color Appointments Based on a Resource Kind
To use the color scheme of a specific resource kind, enable the kind's useColorAsDefault property. Otherwise, appointments use the color scheme of the last resource kind declared in the resources array.
This demo enables you to change the useColorAsDefault property at runtime. Click the radio buttons under the Scheduler to switch between different color schemes.
Assign Multiple Instances of a Resource Kind
Each resource kind object can contain the allowMultiple property. When this property is set to true, users can assign multiple instances of this kind to a single appointment. In this demo, the Assignee resource kind allows multiple instances.
You can also group appointments by resources as shown in the following demo: Group Orientation.