-
AI-powered Extensions
-
Data Grid
-
Tree List
-
Chat
-
HTML Editor
-
Form
-
-
Data Grids / Data Management
-
Data Grid
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Grouping
-
Selection
- Focused Row
- Paging
-
Scrolling
-
Columns
- AI Assistant
-
Master-Detail
-
Data Summaries
-
Drag & Drop
-
Export to PDF
-
Export to Excel
- Appearance
-
Customization
- State Persistence
-
Adaptability
-
Keyboard Navigation
- Right-To-Left Support
-
Tree List
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Selection
- Focused Row
- Paging
-
Columns
- Drag & Drop
- State Persistence
- Adaptability
-
Keyboard Navigation
-
Card View
-
Pivot Grid
- Overview
-
Data Binding
-
Field Management
-
Data Summaries
- Drill Down
- Filtering
-
Scrolling
-
Export to Excel
- Chart Integration
- Customization
- State Persistence
-
Filter Builder
-
-
Data Visualization
-
Charts
- Overview
-
Data Binding
-
Common Concepts
-
Axis
-
Aggregation
-
Tooltips
-
Selection
-
Customization
-
Zooming
-
Export
-
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Funnel and Pyramid Charts
-
Line Charts
- Pareto Chart
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
- Sankey Chart
-
Sparkline Charts
-
Tree Map
-
Gauges
- Overview
-
Runtime update
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
-
Scheduling / Planning
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Appointments
-
Timetable
- Editing
-
Grouping
- Virtual Scrolling
- Drag & Drop
-
Customization
- Adaptability
-
Gantt
- Overview
- Data Binding
-
Filtering
- Sorting
- Strip Lines
- Export to PDF
- Validation
-
Customization
-
-
Messaging
-
WYSIWYG Editor
-
Forms
-
Data Editors
- Overview
-
Common Concepts
-
Calendar
- Check Box
- Color Box
-
Date Box
-
Date Range Box
-
Number Box
- Radio Group
-
Range Selector
- Range Slider
- Slider
- Switch
- Text Area
- Text Box
-
Drop-Downs
- Autocomplete
-
Drop Down Box
-
Select Box
-
Tag Box
-
Lookup
-
Buttons
-
File Upload / File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Popup and Notifications
-
Navigation
- Overview
- Accordion
-
Context Menu
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
-
Stepper
- Pagination
-
List
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
-
-
Interactive Wrappers
-
Sortable
- Resizable
-
-
Progress Indicators
-
Maps
- Overview
-
Map
-
Vector Map
-
Data Binding
- Multiple Layers
-
Markers
- Legend
-
Zooming and Panning
-
Customization
-
-
Localization
Related Demos:
Your search did not match any results.
Scheduler - Create from Selection
This demo creates a new appointment from a multi-cell selection. Click and drag across two or more time cells to select a range. Our Scheduler opens the appointment popup pre-populated with the corresponding start date, end date, and resource group.
Backend API
@model IEnumerable<DevExtreme.MVC.Demos.Models.AppointmentWithResources>
@(Html.DevExtreme().Scheduler()
.ID("scheduler")
.DataSource(Model)
.TimeZone("America/Los_Angeles")
.Views(views => {
views.Add()
.Type(SchedulerViewType.WorkWeek)
.GroupOrientation(Orientation.Horizontal)
.CellDuration(30);
})
.CurrentView(SchedulerViewType.WorkWeek)
.CurrentDate(new DateTime(2021, 4, 21))
.StartDayHour(9)
.EndDayHour(16)
.Groups(new[] { "PriorityId" })
.Resources(res => {
res.Add()
.FieldExpr("PriorityId")
.AllowMultiple(false)
.Label("Priority")
.DataSource(new[] {
new { id = 1, text = "Low Priority", color = "#1D90FF" },
new { id = 2, text = "High Priority", color = "#FF9747" }
});
})
.ShowCurrentTimeIndicator(false)
.AllDayPanelMode(AllDayPanelMode.AllDay)
.TextExpr("Text")
.StartDateExpr("StartDate")
.EndDateExpr("EndDate")
.AllDayExpr("AllDay")
.OnSelectionEnd("onSelectionEnd")
)
<script>
function onSelectionEnd(e) {
const cells = e.selectedCellData;
if(cells.length <= 1) {
return;
}
const startDate = cells[0].startDateUTC || cells[0].startDate;
const endDate = cells[cells.length - 1].endDateUTC || cells[cells.length - 1].endDate;
e.component.showAppointmentPopup({
StartDate: startDate,
EndDate: endDate,
AllDay: cells[0].allDay,
...cells[0].groups
}, true);
}
</script>
using DevExtreme.MVC.Demos.Models.SampleData;
using DevExtreme.MVC.Demos.Models.Scheduler.ResolveTimeConflicts;
using DevExtreme.MVC.Demos.ViewModels;
using System.Web.Mvc;
namespace DevExtreme.MVC.Demos.Controllers {
public class SchedulerController : Controller {
public ActionResult CreateFromSelection() {
return View(SampleData.CreateFromSelectionAppointments);
}
}
}
DevExtreme Scheduler raises the onSelectionEnd event when a user selects cells. The event's selectedCellData array contains one object per selected cell, each with startDate, endDate, allDay, and group field values.
In this sample, the event handler ignores single-cell selection and passes a new appointment object built from the first and last cell in the selection to the showAppointmentPopup method.