Turning off snap-to-grid behavior for moving/resizing

scheduler-snap-to-grid.png

By default, event boxes are snapped to the background time cell grid during moving and resizing in Scheduler. It's possible to move and resize the events by free hand.

Notes:

  1. The actual position is calculated based on the number of pixels per cell (CellWidth).
  2. It's recommended to set UseEventBoxes="Never" to prevent confusion (the moving/resizing shadow width always corresponds to the event box width). See also exact event duration.

ASP.NET WebForms

<DayPilot:DayPilotScheduler runat="server" id="DayPilotScheduler1"
  ...
  SnapToGrid = "false"
/>

ASP.NET MVC

@Html.DayPilotScheduler("dps", new DayPilotSchedulerConfig {
  BackendUrl = ResolveUrl("~/Scheduler/Backend"),
  ...
  SnapToGrid = false
})

JavaScript

<div id="dp"></div>
<script type="text/javascript">
  var dp = new DayPilot.Scheduler("dp");
  dp.snapToGrid = false;
  // ...
  dp.init();
</script>