The rows.sort() method sorts the Scheduler rows using the specified parameter.
DayPilot.Scheduler.rows.sort([spec]);
The spec value can be null | undefined - this will reset the sorting.
dp.rows.sort();
You can use a string that specifies the sort field. Ascending order will be used in this case.
dp.rows.sort("capacity");
You can use an object with "field" and "order" properties which specify the field name and "asc" | "desc" order.
dp.rows.sort({field: "capacity", order: "desc"});